add docker publish

This commit is contained in:
weeman 2021-06-27 16:39:42 +02:00
parent 5113f6995e
commit c8c4d9f99c
Signed by untrusted user: weeman
GPG Key ID: 34F0524D4DA694A1
2 changed files with 17 additions and 15 deletions

View File

@ -27,3 +27,18 @@ steps:
when:
event:
- pull_request
- name: docker-publish
image: plugins/docker
settings:
registry: registry.wtf-eg.net
repo: registry.wtf-eg.net/ki-backend
target: ki-backend
auto_tag: true
username:
from_secret: "docker_username"
password:
from_secret: "docker_password"
when:
branch:
- main

View File

@ -1,17 +1,4 @@
FROM python:3.8-alpine as base
ENV PYROOT /pyroot
ENV PYTHONUSERBASE $PYROOT
FROM base as builder
RUN apk add --no-cache \
gcc \
g++ \
musl-dev \
python3-dev && \
pip3 install pipenv
FROM registry.wtf-eg.net/ki-backend-builder:1.0.0 as builder
COPY Pipfile* ./
@ -19,7 +6,7 @@ RUN PIP_USER=1 PIP_IGNORE_INSTALLED=1 pipenv install --system --deploy --ignore-
RUN pip3 uninstall --yes pipenv
FROM base
FROM registry.wtf-eg.net/ki-backend-base:1.0.0 as ki-backend
# Install six explicitly. Otherwise Python complains about it missing.
RUN pip3 install six