Docker install tools/run command on existing container

I'm using Dokku to run some apps on an Ubuntu 14.04 server. Dokku creates the Docker container with all the stuff in them to run.

I'd like to connect to the running container somehow and run apt-get install phantomjs -y.

How would I go about doing this? If I run this on the Ubuntu host machine will it be available in the docker container?

I don't have access to the Docker file or the buildpacks since that's all part of Dokku

1 Answer

To connect to your application container run

dokku run <app-name> bash

Then

apt-get update
apt-get install <package>

P.S. Another way to do so:

docker ps
docker attach --sig-proxy=false <your-app-container>

This may also not work depending on Dokku configuration.

Edit:Actually, the best way to do it, is to use dokku-apt plugin.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like