Git Product home page Git Product logo

docker-install's Introduction

Install Docker Engine on Ubuntu-20.04

  • Docker Engine is open source and runs natively on Linux.
  • All instructions are for Ubuntu-20.04 distribution.

Windows Requirements

  • For Windows install WSL2 Ubuntu-20.04 distro, helper scripts here

Instructions

Open a terminal and run the installation script.

install-docker.sh

Test it by running the hello world docker container.

docker run hello-world

That's it.

WSL2 Further instructions

One annoying thing is that the docker service may not run automatically on WSL2.

You can check if the service is running with the following command on the WSL2 terminal

systemctl show --property ActiveState docker

If it isn't running, you can fix this by changing your distro to boot with systemd. To enable this, edit the file /etc/wsl.conf and add the following:

[boot]
systemd=true

Then restart your WSL2 instance.

Be aware of Microsoft's WSL2, 8 second rule for configuration changes. You'll need to wait until your Linux distro shuts down completely and then restarts for changes to stick. Before restarting check that the previous instance of WSL2 has actually shut down. On a PowerShell terminal type:

wsl --list --running

If the docker service still doesn't start automatically then you then you can edit your .profile in your home directory and insert the following at the end of it.

# check that docker is running                                
if service docker status 2>&1 | grep -q "is not running"; then
         wsl.exe -d "${WSL_DISTRO_NAME}" -u root -e /usr/sbin/service docker start >/dev/null 2>&1
fi

Test that docker works, by running the hello world docker container.

docker run hello-world

That's it.

docker-install's People

Contributors

parrotrueper avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.