I can manage Ubuntu in a docker container and install/configure nginx.
But here’s one: https://github.com/stilliard/docker-pure-ftpd
sudo docker pull stilliard/pure-ftpd
Then it says, “Once inside” Create an ftp user: e.g. bob with access only to /home/ftpusers/bob
How do I get inside, I already tried using docker attach ‘container’ and I can’t connect.
Here’s another one: https://registry.hub.docker.com/u/dockerfile/nginx/ After few seconds, open http://<host> to see the welcome page.
It works!
But I can’t find the nginx folder anywhere or to access the placeholder.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Generally you don’t want to be making changes to a live Docker container as they don’t save the state. If you need to do something like create a user inside the container, you’re probably better off doing this in the Dockerfile. Though attaching to a running container is possible. First run docker ps to find the container’s ID. Then you can enter the container with:
docker attach CONTAINER_ID
For your Nginx example http://<host> , the host is the IP address of the machine running Docker. If you want to access files inside the container, it’s better to bind mount them from the host. That way they are persistent. For instance, running:
docker run -d -p 80:80 -v /etc/nginx/sites-enabled:/etc/nginx/sites-enabled -v /var/www/html:/var/www/html dockerfile/nginx
will mount the host folders /etc/nginx/sites-enabled and /var/www/html inside the container.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.