Look for best practice configuration management after ember build, if at all possible. Although this is not necessarily a specific Docker, the following should give you a good idea of the requirement, even if you are not a Docker veteran.
Motivation: We use the Docker + Docker Hub to (automatically) create and deploy our internal and external application interfaces separately. There are several deployment options. Frontend app is based on Ember (using ember-cli). Instead of launching ember build --environment deployment-{1..N}in a separate Docker file and ending up with several Docker images, I would prefer to have one Docker image and run the Docker container with the required settings passed as environment variables so that I can later insert them into the Ember configuration, for example :
docker run -e ENV_APP_APIURL=deployment1.example.com ... --name deployment1 dockerimage
Then I ran a small script like ENTRYPOINTin the Dockerfile, which consumes these environment variables and injects them into the embedded Ember application so that the web server can serve the reconfigured application. Shortly speaking:
[ember app] >> build >> [compiled generic web app] >> reconfigure(?) >> [final web app]
Is this commonplace, or should I go and get some coffee?
source
share