Building Docker Images
Building Docker images with Pro and Web requires an additional step to add the private hex repo. Passing the password in as build arguments isn't secure, and you should use buildkit's secret support instead if possible.
Reference the secrets within in your Dockerfile
by mounting it within a RUN
command:
RUN --mount=type=secret,id=oban_auth_key \
mix hex.repo add oban https://repo.oban.pro \
--fetch-public-key SHA256:4/OSKi0NRF91QVVXlGAhb/BIMLnK8NHcx/EWs+aIWPc \
--auth-key "$(cat /run/secrets/oban_auth_key)"
Then, at build time, pass the license through using the --secret
flag:
docker build --secret id=oban_auth_key,env=OBAN_AUTH_KEY .