Skip to content

adamhgriffith-uofu/rootless-docker-vagrant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rootless Docker on Centos7

Running Docker containers and daemon rootless on a Centos7 VM via Vagrant.

Requirements

Vagrant

Build and Run

Bring up CentOS7 virtual machine and a rootless Docker process as docky:

vagrant up

SSH into the VM and switch to the docky user:

vagrant ssh
[vagrant@centos7 ~]# sudo su - docky

Verify Docker is running correctly using the hello-world image:

-bash-4.2$ docker run hello-world

Try out a web server like nginx:

-bash-4.2$ docker run -p 80:80 -d nginx:1.18-alpine

This should fail as a non-root docker may not expose a container on a privileged port (<1024). Try a different web application like the Ghost blog:

-bash-4.2$ docker run -p 2368:2368 -d ghost

On your local machine open a web browser and navigate to http://localhost:2368 (made possible by an existing Vagrant forwarded_port).

Teardown

Tearing down the VM is done with a single command:

vagrant destroy -f

See Vagrant: Destroy for additional information.

Resources

About

Rootless Docker in Vagrant.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages