If you know that your application will always and forever have the same static assets, then simply download them using the application and do it with it.
But everything changes, so when you need it, I would recommend the Docker Volume Container : put your static assets in the DVC and install this DVC in the main container, so all this is pretty much “just one application container”. You can use Docker Compose something like this:
appdata: image: busybox volumes: - /path/to/app/static command: echo "I'm just a volume container" app: build: . volumes_from: - appdata command: …
You can continue further by starting the container with a script loading buffer that copies the source static files to the destination path at startup. That way, your application will always have a default set to get started, but when you add an application, you can add more static files. For example, take the official Jenkins container and read /usr/local/bin/jenkins.sh .
source share