diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb53edc5f7e577aef698f2967d0de8534a16483f..17327ae114a726a28ed7eccf4b2a2d04c1f41dd0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,18 @@ -image: - name: gcr.io/kaniko-project/executor:debug - entrypoint: [""] +stages: + - lint + - build + +lint: + stage: lint + image: hadolint/hadolint:latest-debian + script: + - hadolint Dockerfile build: stage: build + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] script: - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA --destination $CI_REGISTRY_IMAGE:latest diff --git a/Dockerfile b/Dockerfile index 2229e2dcaf8e04a394580923270b90300e477847..02f6708e85567205e2f982cdcb86cbfb70a261e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,9 @@ ENV ACCEPT_KEYWORDS="~amd64" \ EMERGE_DEFAULT_OPTS="--jobs=4 --quiet" \ FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox" \ MAKEOPTS="-j4" \ - USE="-perl" + USE="-perl -ipc -rsync-verify" # https://github.com/gentoo/gentoo-docker-images/issues/79 -RUN emerge --unmerge dev-python/setuptools dev-python/certifi \ +RUN emerge --unmerge dev-python/setuptools dev-python/certifi \ && emerge dev-vcs/git app-portage/repoman dev-util/pkgcheck + && rm -rf /var/cache/distfiles/*