From 09800cb8a33fc83bff3a95b55ac708b7d4c4c5fa Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 9 Feb 2022 22:49:27 +0100 Subject: [PATCH] Fixed Dockerfile but commented out docker stage in ci temporarily --- .gitlab-ci.yml | 52 +++++++++++++++++++++++++------------------------- Dockerfile | 4 ++-- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 34fa9870a..796f551da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -97,29 +97,29 @@ upload-windows-updater-release: - aws --endpoint-url $AWS_SERVICE_URL s3api put-object --bucket "$AWS_BUCKET_NAME" --key "dl/bot/$INSTALLER_FILE_NAME" --acl public-read --body "$INSTALLER_OUTPUT_DIR/$INSTALLER_FILE_NAME" - aws --endpoint-url $AWS_SERVICE_URL s3api put-object --bucket "$AWS_BUCKET_NAME" --key "dl/bot/releases-v4.json" --acl public-read --body "releases-v4.json" -docker-build: - # Use the official docker image. - image: docker:latest - stage: build - services: - - docker:dind - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - # Default branch leaves tag empty (= latest tag) - # All other branches are tagged with the escaped branch name (commit ref slug) - script: - - | - if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then - tag="" - echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'" - else - tag=":$CI_COMMIT_REF_SLUG" - echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" - fi - - docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" . - - docker push "$CI_REGISTRY_IMAGE${tag}" - # Run this job in a branch where a Dockerfile exists - rules: - - if: $CI_COMMIT_BRANCH - exists: - - Dockerfile +# docker-build: +# # Use the official docker image. +# image: docker:latest +# stage: build +# services: +# - docker:dind +# before_script: +# - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY +# # Default branch leaves tag empty (= latest tag) +# # All other branches are tagged with the escaped branch name (commit ref slug) +# script: +# - | +# if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then +# tag="" +# echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'" +# else +# tag=":$CI_COMMIT_REF_SLUG" +# echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" +# fi +# - docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" . +# - docker push "$CI_REGISTRY_IMAGE${tag}" +# # Run this job in a branch where a Dockerfile exists +# rules: +# - if: $CI_COMMIT_BRANCH +# exists: +# - Dockerfile diff --git a/Dockerfile b/Dockerfile index 169a6d05f..f6f7ae380 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0-buster-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /source COPY src/NadekoBot/*.csproj src/NadekoBot/ @@ -18,7 +18,7 @@ RUN set -xe; \ chmod +x /app/NadekoBot # final stage/image -FROM mcr.microsoft.com/dotnet/runtime:6.0-buster-slim +FROM mcr.microsoft.com/dotnet/runtime:6.0 WORKDIR /app RUN set -xe; \