Install Docker CE from here
NOTE: Make sure you use
sudo -E <command>
wherever necessary for preserving environment variables
Setup HTTP/HTTPS proxy by following instructions given on this link
- Create the
docker
group.
sudo groupadd docker
- Add your user to the
docker
group.
sudo usermod -aG docker $USER
-
Log out and log back in so that your group membership is re-evaluated.
-
Verify that you can run
docker
commands withoutsudo
.
docker run hello-world
Go through this page if you face any issues.
- Clone this repository and change the working directory to
swarm-docker
. - Build docker image using
Dockerfile
.
docker build --tag=swarm-docker - < Dockerfile
- Create container.
xhost +;
docker run -it --privileged \
--env=LOCAL_USER_ID="$(id -u)" \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-e DISPLAY=:0 \
--name=swarm-docker swarm-docker /bin/bash;
- Exit the dontainer.
- To use this container.
xhost +;
sudo docker start swarm-docker;
sudo docker exec -u 0 -it swarm-docker bash
Follow these instructions in case of any graphics driver issues.