I am trying to build a docker image inside a circleci container, I am using the
docker:edge-git image based on
alpine as explained in the tutorial How to build a docker image in CircleCI 2.0
This is the relevant part of my
version: 2 jobs: build: docker: - image: docker:edge-git working_directory: /app steps: - checkout - run: name: Install dependencies command: | apk add --no-cache bash - run: echo 'export PATH="/app/make:$PATH"' >> $BASH_ENV - run: | echo $PATH - run: | source $BASH_ENV echo $PATH
and see the result (screenshot taken with other values for $PATH, but still relevant):
As said in this topic : Injecting custom environment variables when running locally via CircleCI CLI apparently sourcing does not works for images that have no bash installed, what can I do to fix this without needing to source my file prior to each RUN command ?