Hello I’ve been trying to build a docker image for hours and while I fix a few issues, I am (I think) really close to a working state.
Here’s my CI:
release: stage: release before_script: *setup variables: MIX_ENV: "prod" script: - mix release artifacts: paths: - _build untracked: true # reminder: it it's the runner to run with privileged=true docker: image: docker:19.03 stage: docker dependencies: - release services: - name: docker:19.03-dind alias: docker variables: IMAGE_TAG: prezance_api:$CI_COMMIT_SHORT_SHA DOCKER_HOST: tcp://docker:2375 DOCKER_TLS_CERTDIR: "" script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker build -t $IMAGE_TAG . - docker push $IMAGE_TAG
The release stage works and provide an artifact with _build/ folder. But the _build/ folder is not available on the docker stage. I first tried with 19.03.12 but I read there is some mounting to do https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-docker-in-docker-workflow-with-docker-executor) so I downgraded image to 19.03 and still no luck.
Am I missing something?