Skip to content

Instantly share code, notes, and snippets.

@mivade
Created May 4, 2023 14:53
Show Gist options
  • Save mivade/a9a4c5aca8bd8b3934a63f2cf2cdc522 to your computer and use it in GitHub Desktop.
Save mivade/a9a4c5aca8bd8b3934a63f2cf2cdc522 to your computer and use it in GitHub Desktop.
Installing Docker in Ubuntu on WSL

Installing Docker in Ubuntu on WSL

Install upstream Docker

Follow the instructions here

Start the service and troubleshoot problems

sudo service docker start

See if the Docker daemon is running:

sudo docker ps

If you get an error about not being able to connect to the Docker socket check the logs at /var/logs/docker.log. You can confirm that the service is in fact down with service docker status. If you see something about iptables you'll want to edit /etc/init.d/docker. Look for the line with DOCKER_OPTS= and edit it to read

DOCKER_OPTS="--iptables=false"

Restart the service with sudo service docker start and confirm it's running with service docker status. Note that this is obviously not the most secure approach but for development environments it should be fine.

References

@mivade
Copy link
Author

mivade commented May 23, 2023

This seems to work for running containers but I am unable to access outside network resources from inside of the containers.

@mivade
Copy link
Author

mivade commented May 23, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment