aptible config:set, are not available to commands executed during the Docker build.
It’s a good idea to follow Docker best practice and avoid depending on Configuration variables in instructions in your Dockerfile, but if you absolutely need to, Aptible provides a workaround: .aptible.env.
.aptible.env
When building your image, Aptible injects a .aptible.env file at the root of your repository prior to running the Docker build. The file contains your Configuration variables, and can be sourced by a shell.
Here’s an example:

