Commit 25f029eb authored by Alessio Parma's avatar Alessio Parma 🐔

docker build

parent 1d2a13dd
Pipeline #152130227 failed with stages
in 2 minutes and 8 seconds
......@@ -10,7 +10,7 @@ check-source-code-format:
script:
- dotnet format --dry-run --check --verbosity diagnostic
build-docker-image:
build-testing-docker-image:
stage: build
image: docker:latest
services:
......@@ -43,11 +43,13 @@ publish-on-docker-hub:
- docker:dind
variables:
DOCKER_TAG_PREFIX: $DOCKER_ORGANIZATION/$DOCKER_REPOSITORY
DOCKERFILE_LOCATION: src/PommaLabs.Thumbnailer/Dockerfile
script:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker pull $CI_REGISTRY_IMAGE:testing
- docker tag $CI_REGISTRY_IMAGE:testing $DOCKER_TAG_PREFIX:latest
- docker build -t $DOCKER_TAG_PREFIX:latest -f $DOCKERFILE_LOCATION.latest .
- docker push $DOCKER_TAG_PREFIX:latest
- docker build -t $DOCKER_TAG_PREFIX:azure-appsvc -f $DOCKERFILE_LOCATION.azure-appsvc .
- docker push $DOCKER_TAG_PREFIX:azure-appsvc
only:
- master
except:
......@@ -72,11 +74,12 @@ deploy-on-heroku:
services:
- docker:dind
variables:
DOCKER_TAG_PREFIX: $DOCKER_ORGANIZATION/$DOCKER_REPOSITORY
HEROKU_REGISTRY: registry.heroku.com
script:
- docker login -u _ -p $HEROKU_API_KEY $HEROKU_REGISTRY
- docker pull $DOCKER_ORGANIZATION/$DOCKER_REPOSITORY:latest
- docker tag $DOCKER_ORGANIZATION/$DOCKER_REPOSITORY:latest $HEROKU_REGISTRY/$HEROKU_APP_NAME/web
- docker pull $DOCKER_TAG_PREFIX:latest
- docker tag $DOCKER_TAG_PREFIX:latest $HEROKU_REGISTRY/$HEROKU_APP_NAME/web
- docker push $HEROKU_REGISTRY/$HEROKU_APP_NAME/web
- apk add --no-cache curl
- |-
......
# https://gitlab.com/pommalabs/thumbnailer/-/tree/base-image
FROM pommalabs/thumbnailer:azure-appsvc-base AS base
HEALTHCHECK --interval=5m --timeout=10s \
CMD curl -f http://localhost:$PORT/health || exit 1
FROM pommalabs/dotnet:3-sdk AS build
COPY ["NuGet.config", ""]
......
# https://gitlab.com/pommalabs/thumbnailer/-/tree/base-image
FROM pommalabs/thumbnailer:latest-base AS base
HEALTHCHECK --interval=5m --timeout=10s \
CMD curl -f http://localhost:$PORT/health || exit 1
FROM pommalabs/dotnet:3-sdk AS build
COPY ["NuGet.config", ""]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment