Skip to content

Instantly share code, notes, and snippets.

@ErykDarnowski
Last active April 30, 2023 11:04
Show Gist options
  • Save ErykDarnowski/a8f3de9f335ca13b7b1537daeb1dd008 to your computer and use it in GitHub Desktop.
Save ErykDarnowski/a8f3de9f335ca13b7b1537daeb1dd008 to your computer and use it in GitHub Desktop.
How to install Docker and Docker Compose on Arch Linux

How to install Docker and Docker Compose on Arch Linux

Or install them automatically

  1. Install docker:
yes | sudo pacman -Syu docker
  1. Install docker-compose (optional):
yes | sudo pacman -S docker-compose
  1. Start the docker daemon:
sudo service docker start   # for SysVinit
sudo systemctl start docker # for Systemd
  1. To run docker as a non-privileged user - without sudo (optional):

       1. Add docker group:

sudo groupadd docker

       2. Add current user to the docker group.

sudo gpasswd -a $USER docker

       3. Apply changes made to groups:

           You can do either, however they're sorted from least to most likely to work:

  • newgrp docker
  • logout and login
  • restart your machine (this is the safest bet)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment