From ae05f2ab17f7b7d57d76c117f7611ad336d4ed18 Mon Sep 17 00:00:00 2001 From: Bastian Dietrich Date: Sat, 5 Feb 2022 17:00:17 +0100 Subject: [PATCH] Aktualisieren Dockerfile, .gitlab-ci.yml --- .gitlab-ci.yml | 13 +++++++++++++ Dockerfile | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..2835851 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,13 @@ +build: + stage: build + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] + script: + - mkdir -p /kaniko/.docker + - echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json + - >- + /kaniko/executor + --context "${CI_PROJECT_DIR}" + --dockerfile "${CI_PROJECT_DIR}/Dockerfile" + --destination "${CI_REGISTRY_IMAGE}:latest" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..38bbf73 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:latest + +WORKDIR /opt/venv +RUN git clone https://git.linux-kernel.at/oliver/ivatar.git . + +ENV VIRTUAL_ENV=/opt/venv +RUN python3 -m venv $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" + +RUN /opt/venv/bin/python3 -m pip install --upgrade pip +RUN pip install pillow && pip install -r requirements.txt + +CMD ["python", "manage.py runserver 0:8080"]