Skip to content

Instantly share code, notes, and snippets.

@rstacruz
Last active November 1, 2025 19:07
Show Gist options
  • Select an option

  • Save rstacruz/297fc799f094f55d062b982f7dac9e41 to your computer and use it in GitHub Desktop.

Select an option

Save rstacruz/297fc799f094f55d062b982f7dac9e41 to your computer and use it in GitHub Desktop.

Revisions

  1. rstacruz revised this gist Jun 29, 2018. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ brew cask install docker # Install Docker
    open /Applications/Docker.app # Start Docker
    ```

    :bulb: Tip: Avoid _Docker Toolbox_ and _boot2docker_. These are older packages that have been ceded by _Docker for Mac_.
    > :bulb: Tip: Avoid _Docker Toolbox_ and _boot2docker_. These are older packages that have been ceded by _Docker for Mac_.
    ### Arch Linux

    @@ -35,13 +35,13 @@ sudo apt install docker-compose
    sudo systemctl start docker
    ```

    If the `docker.io` package isn't available for you, see [Get Docker CE for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/) for an alternative.
    > :bulb: Tip: If the `docker.io` package isn't available for you, see [Get Docker CE for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/) for an alternative.
    ### Windows

    Install [Windows Subsystem for Linux][wsl] and choose _Ubuntu_ as your guest OS. Install Docker as you normally would on Ubuntu (see above). After that, [see these instructions](https://github.com/Microsoft/WSL/issues/2291#issuecomment-383698720) for info on how to get it running.

    :bulb: Tip: Avoid _Docker for Windows_. While it works in most cases, you'll still face NTFS limitations without WSL (eg, lack of symlinks, which is needed for Yarn/npm to work).
    > :bulb: Tip: Avoid _Docker for Windows_. While it works in most cases, you'll still face NTFS limitations without WSL (eg, lack of symlinks, which is needed for Yarn/npm to work).
    [wsl]: https://docs.microsoft.com/en-us/windows/wsl/install-win10

  2. rstacruz revised this gist Jun 29, 2018. 1 changed file with 28 additions and 20 deletions.
    48 changes: 28 additions & 20 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    ## How to install Docker in...
    # Getting Docker

    Docker is available for Linux, MacOS, and Windows.

    ### MacOS

    @@ -20,31 +22,29 @@ sudo pacman -Syu docker # Install Docker
    sudo systemctl start docker # Start Docker
    ```

    ### Windows

    Docker for Windows is best installed with Chocolatey. See the [docker-for-windows](https://chocolatey.org/packages/docker-for-windows) package. For other ways to install on Windows, see [Install Docker for Windows](https://docs.docker.com/docker-for-windows/install/) in Docker's Docs.

    ```powershell
    C:\> choco install docker-for-windows --pre
    ```

    ### Ubuntu

    See [Get Docker CE for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/). Here's a short run-down of the commands you need is below.
    `docker.io` is available from the Ubuntu repositories (as of Xenial).

    ```bash
    # ---------------------------------------------------------------------------------------------
    # /!\ Read https://docs.docker.com/install/linux/docker-ce/ubuntu/ to understand what these do!
    # ---------------------------------------------------------------------------------------------

    sudo apt install apt-transport-https ca-certificates curl software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    sudo apt-get update
    sudo apt install docker-ce
    # Install Docker
    sudo apt install docker.io
    sudo apt install docker-compose

    # Start it
    sudo systemctl start docker
    ```

    If the `docker.io` package isn't available for you, see [Get Docker CE for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/) for an alternative.

    ### Windows

    Install [Windows Subsystem for Linux][wsl] and choose _Ubuntu_ as your guest OS. Install Docker as you normally would on Ubuntu (see above). After that, [see these instructions](https://github.com/Microsoft/WSL/issues/2291#issuecomment-383698720) for info on how to get it running.

    :bulb: Tip: Avoid _Docker for Windows_. While it works in most cases, you'll still face NTFS limitations without WSL (eg, lack of symlinks, which is needed for Yarn/npm to work).

    [wsl]: https://docs.microsoft.com/en-us/windows/wsl/install-win10

    ### Other OS's

    For other operating systems, see: <https://www.docker.com/community-edition#download>
    @@ -66,7 +66,7 @@ $ docker-compose --version
    docker-compose version 1.21.2, build unknown
    ```

    ## Starting the Daemon
    ## Starting Docker

    If you get an error like the one below, you might need to start the Docker daemon.

    @@ -81,3 +81,11 @@ To start the Docker daemon, it probably needs one of these commands
    open /Applications/Docker.app # macOS
    sudo systemctl start docker # Arch, Ubuntu, CentOS
    ```

    ## Enabling on startup

    For Arch Linux, Ubuntu and CentOS, this will enable auto-starting of the Docker service:

    ```sh
    sudo systemctl enable docker
    ```
  3. rstacruz revised this gist Jun 27, 2018. 1 changed file with 16 additions and 20 deletions.
    36 changes: 16 additions & 20 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,38 +1,36 @@
    # How to install Docker in...
    ## How to install Docker in...

    ## MacOS
    ### MacOS

    Best installed with [Homebrew](http://brew.sh) + [Homebrew Cask](http://caskroom.io/).
    Docker for Mac is best installed with [Homebrew](http://brew.sh) and [Homebrew Cask](http://caskroom.io/). For other ways to install on MacOS, see [Install Docker for Mac](https://docs.docker.com/docker-for-mac/install/) in Docker's docs.

    ```bash
    brew cask install docker # Install Docker
    open /Applications/Docker.app # Start Docker
    ```

    For other ways to install on MacOS, see [Install Docker for Mac](https://docs.docker.com/docker-for-mac/install/) in Docker's docs.
    :bulb: Tip: Avoid _Docker Toolbox_ and _boot2docker_. These are older packages that have been ceded by _Docker for Mac_.

    ## Arch Linux
    ### Arch Linux

    Docker is available in Arch Linux's repositories. Also see [Docker in ArchWiki](https://wiki.archlinux.org/index.php/Docker).

    ```bash
    sudo pacman -Syu docker # Install Docker
    sudo systemctl start docker # Start Docker
    ```

    Also see [Docker in ArchWiki](https://wiki.archlinux.org/index.php/Docker).

    ## Windows
    ### Windows

    Best installed with Chocolatey. See the [docker-for-windows](https://chocolatey.org/packages/docker-for-windows) package.
    Docker for Windows is best installed with Chocolatey. See the [docker-for-windows](https://chocolatey.org/packages/docker-for-windows) package. For other ways to install on Windows, see [Install Docker for Windows](https://docs.docker.com/docker-for-windows/install/) in Docker's Docs.

    ```powershell
    C:\> choco install docker-for-windows --pre
    ```

    For other ways to install on Windows, see [Install Docker for Windows](https://docs.docker.com/docker-for-windows/install/) in Docker's Docs.

    ## Ubuntu
    ### Ubuntu

    See [Get Docker CE for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/). Here's a short run-down of the commands you need:
    See [Get Docker CE for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/). Here's a short run-down of the commands you need is below.

    ```bash
    # ---------------------------------------------------------------------------------------------
    @@ -47,13 +45,11 @@ sudo apt install docker-ce
    sudo apt install docker-compose
    ```

    After installing, verify if it works.
    ### Other OS's

    ## Other OS's
    For other operating systems, see: <https://www.docker.com/community-edition#download>

    See: <https://www.docker.com/community-edition#download>

    # Verifying if it works
    ## Verifying if it works

    If everything works, you should have the following commands available:

    @@ -79,9 +75,9 @@ $ docker info
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    ```

    To start the Docker daemon, it probably needs one of these commands
    To start the Docker daemon, it probably needs one of these commands

    ```bash
    open /Applications/Docker.app # macOS
    sudo systemctl start docker # Arch, Ubuntu, CentOS
    ```
    ```
  4. rstacruz revised this gist Jun 27, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -66,7 +66,7 @@ Paused: 0
    ```

    ```bash
    $ docker-compose --vercsion
    $ docker-compose --version
    docker-compose version 1.21.2, build unknown
    ```

  5. rstacruz revised this gist Jun 27, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -49,11 +49,11 @@ sudo apt install docker-compose

    After installing, verify if it works.

    ## Other
    ## Other OS's

    See: <https://www.docker.com/community-edition#download>

    ## Verifying if it works
    # Verifying if it works

    If everything works, you should have the following commands available:

  6. rstacruz revised this gist Jun 27, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -53,7 +53,7 @@ After installing, verify if it works.

    See: <https://www.docker.com/community-edition#download>

    ## Verifying
    ## Verifying if it works

    If everything works, you should have the following commands available:

  7. rstacruz revised this gist Jun 27, 2018. 1 changed file with 17 additions and 0 deletions.
    17 changes: 17 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -44,6 +44,7 @@ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    sudo apt-get update
    sudo apt install docker-ce
    sudo apt install docker-compose
    ```

    After installing, verify if it works.
    @@ -67,4 +68,20 @@ Paused: 0
    ```bash
    $ docker-compose --vercsion
    docker-compose version 1.21.2, build unknown
    ```

    ## Starting the Daemon

    If you get an error like the one below, you might need to start the Docker daemon.

    ```bash
    $ docker info
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    ```

    To start the Docker daemon, it probably needs one of these commands

    ```bash
    open /Applications/Docker.app # macOS
    sudo systemctl start docker # Arch, Ubuntu, CentOS
    ```
  8. rstacruz revised this gist Jun 27, 2018. 1 changed file with 20 additions and 1 deletion.
    21 changes: 20 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -46,6 +46,25 @@ sudo apt-get update
    sudo apt install docker-ce
    ```

    After installing, verify if it works.

    ## Other

    See: <https://www.docker.com/community-edition#download>
    See: <https://www.docker.com/community-edition#download>

    ## Verifying

    If everything works, you should have the following commands available:

    ```bash
    $ docker info
    Containers: 0
    Running: 0
    Paused: 0
    ...
    ```

    ```bash
    $ docker-compose --vercsion
    docker-compose version 1.21.2, build unknown
    ```
  9. rstacruz revised this gist Jun 27, 2018. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,10 @@ For other ways to install on Windows, see [Install Docker for Windows](https://d
    See [Get Docker CE for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/). Here's a short run-down of the commands you need:

    ```bash
    # Read https://docs.docker.com/install/linux/docker-ce/ubuntu/ to understand what these do!
    # ---------------------------------------------------------------------------------------------
    # /!\ Read https://docs.docker.com/install/linux/docker-ce/ubuntu/ to understand what these do!
    # ---------------------------------------------------------------------------------------------

    sudo apt install apt-transport-https ca-certificates curl software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  10. rstacruz revised this gist Jun 27, 2018. No changes.
  11. rstacruz revised this gist Jun 26, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # How to install Docker in...

    ## MacOS

    Best installed with [Homebrew](http://brew.sh) + [Homebrew Cask](http://caskroom.io/).
  12. rstacruz revised this gist Jun 26, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ brew cask install docker # Install Docker
    open /Applications/Docker.app # Start Docker
    ```

    For other ways to install on MacOS, see [Install Docker for Mac](https://docs.docker.com/docker-for-windows/install/)) in Docker's docs.
    For other ways to install on MacOS, see [Install Docker for Mac](https://docs.docker.com/docker-for-mac/install/) in Docker's docs.

    ## Arch Linux

  13. rstacruz created this gist Jun 26, 2018.
    46 changes: 46 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    ## MacOS

    Best installed with [Homebrew](http://brew.sh) + [Homebrew Cask](http://caskroom.io/).

    ```bash
    brew cask install docker # Install Docker
    open /Applications/Docker.app # Start Docker
    ```

    For other ways to install on MacOS, see [Install Docker for Mac](https://docs.docker.com/docker-for-windows/install/)) in Docker's docs.

    ## Arch Linux

    ```bash
    sudo pacman -Syu docker # Install Docker
    sudo systemctl start docker # Start Docker
    ```

    Also see [Docker in ArchWiki](https://wiki.archlinux.org/index.php/Docker).

    ## Windows

    Best installed with Chocolatey. See the [docker-for-windows](https://chocolatey.org/packages/docker-for-windows) package.

    ```powershell
    C:\> choco install docker-for-windows --pre
    ```

    For other ways to install on Windows, see [Install Docker for Windows](https://docs.docker.com/docker-for-windows/install/) in Docker's Docs.

    ## Ubuntu

    See [Get Docker CE for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/). Here's a short run-down of the commands you need:

    ```bash
    # Read https://docs.docker.com/install/linux/docker-ce/ubuntu/ to understand what these do!
    sudo apt install apt-transport-https ca-certificates curl software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    sudo apt-get update
    sudo apt install docker-ce
    ```

    ## Other

    See: <https://www.docker.com/community-edition#download>