1
0
Fork 0
forked from s3lph/matemat

Use Python 3.9, build docker image with kaniko instead of mapped docker socket

This commit is contained in:
s3lph 2022-07-16 19:29:30 +02:00
parent b486b6f3c8
commit 82a82c4990
3 changed files with 33 additions and 11 deletions

View file

@ -29,19 +29,40 @@ codestyle:
build_docker: build_docker_tag:
stage: build stage: build
image:
name: gcr.io/kaniko-project/executor
entrypoint: [""]
script: script:
- docker build -t "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_SHA" -f package/docker/Dockerfile . - mkdir -p /kaniko/.docker
- docker tag "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_SHA" "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_REF_NAME" - echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- if [[ -n "$CI_COMMIT_TAG" ]]; then docker tag "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_SHA" "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_TAG"; fi - >-
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD registry.gitlab.com /kaniko/executor
- docker push "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_SHA" --context .
- docker push "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_REF_NAME" --dockerfile package/docker/Dockerfile
- if [[ -n "$CI_COMMIT_TAG" ]]; then docker push "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_TAG"; fi --destination "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_SHA"
--destination "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_REF_NAME"
--destination "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_TAG"
only:
- tags
build_docker_staging:
stage: build
image:
name: gcr.io/kaniko-project/executor
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 .
--dockerfile package/docker/Dockerfile
--destination "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_SHA"
--destination "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_REF_NAME"
only: only:
- staging - staging
- tags
build_wheel: build_wheel:
stage: build stage: build

View file

@ -3,11 +3,12 @@
<!-- BEGIN RELEASE v0.2.10 --> <!-- BEGIN RELEASE v0.2.10 -->
## Version 0.2.10 ## Version 0.2.10
Feature release Feature release, Python 3.9
### Changes ### Changes
<!-- BEGIN CHANGES 0.2.10 --> <!-- BEGIN CHANGES 0.2.10 -->
- Use Python 3.9 by default
- Feature: Let users transfer funds to another account - Feature: Let users transfer funds to another account
<!-- END CHANGES 0.2.10 --> <!-- END CHANGES 0.2.10 -->

View file

@ -1,5 +1,5 @@
FROM python:3.7-alpine FROM python:3.9-alpine
ADD . / ADD . /
RUN mkdir -p /var/matemat/db /var/matemat/upload \ RUN mkdir -p /var/matemat/db /var/matemat/upload \