Compare commits
2 Commits
a6f7b9b595
...
d6d4cbc74a
Author | SHA1 | Date | |
---|---|---|---|
d6d4cbc74a | |||
184e858fea |
@ -6,7 +6,7 @@ build:
|
||||
interruptible: true
|
||||
stage: build
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH
|
||||
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
|
||||
tags: [ docker ]
|
||||
before_script:
|
||||
- echo "COMMIT=${CI_COMMIT_SHA}" >> version.env # COMMIT=`git rev-parse HEAD`
|
||||
@ -29,6 +29,13 @@ deploy:
|
||||
- source version.env
|
||||
- echo "Building docker image for commit ${COMMIT} with version ${VERSION}"
|
||||
script:
|
||||
- echo "GitLab-Registry"
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||
- docker build . --tag ${CI_REGISTRY}/${CI_PROJECT_PATH}/${CI_BUILD_REF_NAME}:${VERSION}
|
||||
- docker build . --tag ${CI_REGISTRY}/${CI_PROJECT_PATH}/${CI_BUILD_REF_NAME}:latest
|
||||
- docker push ${CI_REGISTRY}/${CI_PROJECT_PATH}/${CI_BUILD_REF_NAME}:${VERSION}
|
||||
- docker push ${CI_REGISTRY}/${CI_PROJECT_PATH}/${CI_BUILD_REF_NAME}:latest
|
||||
- echo "Docker-Hub"
|
||||
- docker login -u $PUBLIC_REGISTRY_USER -p $PUBLIC_REGISTRY_TOKEN
|
||||
- docker build . --tag $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:${VERSION}
|
||||
- docker build . --tag $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:latest
|
||||
|
@ -39,6 +39,11 @@ There are some more internal api endpoints for handling authentication and lease
|
||||
|
||||
## Docker
|
||||
|
||||
Docker-Images are available here:
|
||||
|
||||
- [Docker-Hub](https://hub.docker.com/repository/docker/collinwebdesigns/fastapi-dls): `collinwebdesigns/fastapi-dls:latest`
|
||||
- GitLab-Registry: `registry.git.collinwebdesigns.de/oscar.krause/fastapi-dls/main:latest`
|
||||
|
||||
**Run this on the Docker-Host**
|
||||
|
||||
```shell
|
||||
|
Loading…
Reference in New Issue
Block a user