diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 70400134..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,50 +0,0 @@ -.docker-build: &docker-build - - export DOCKER_BUILDKIT=1 - - docker build --cache-from "$CI_REGISTRY_IMAGE:latest" --pull -t "$CI_REGISTRY_IMAGE${tag}" . - - docker push "$CI_REGISTRY_IMAGE${tag}" - -.docker-login-before: &docker-login-before - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - -stages: - - docker-build - -services: - - docker:dind - -image: docker:latest - -docker-build-branch: - image: docker:latest - stage: docker-build - before_script: - - *docker-login-before - 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 - rules: - - if: $CI_COMMIT_BRANCH - exists: - - Dockerfile - -docker-build-tag: - image: docker:latest - stage: docker-build - before_script: - - *docker-login-before - script: - - | - tag=":$CI_COMMIT_TAG" - echo "Running on tag '$CI_COMMIT_TAG': tag = $tag" - - *docker-build - rules: - - if: $CI_COMMIT_TAG - exists: - - Dockerfile diff --git a/Dockerfile b/Dockerfile index 9ce279ba..ba9fada4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,11 @@ FROM maven:3.6.3-jdk-11-slim as s3proxy-builder LABEL maintainer="Andrew Gaul " COPY . /opt/s3proxy/ -RUN mkdir /home/.m2 WORKDIR /opt/s3proxy -USER root RUN mvn package -DskipTests # Multistage - Image -FROM adoptopenjdk/openjdk11:jdk-11.0.11_9-alpine +FROM openjdk:11-jre-slim LABEL maintainer="Andrew Gaul " WORKDIR /opt/s3proxy