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
image:
name: gcr.io/kaniko-project/executor
entrypoint: [""]
script:
- docker build -t "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_SHA" -f package/docker/Dockerfile .
- docker tag "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_SHA" "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_REF_NAME"
- 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
- docker push "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_SHA"
- docker push "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_REF_NAME"
- if [[ -n "$CI_COMMIT_TAG" ]]; then docker push "registry.gitlab.com/s3lph/matemat:$CI_COMMIT_TAG"; fi
- 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"
--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:
- staging
- tags
build_wheel:
stage: build

View file

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

View file

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