summaryrefslogtreecommitdiff
path: root/gemini/posts/docker/2022-03-07/installing-docker-on-arch-linux/index.gmi
blob: 88bd783ec2b591df08d51122758ef08ead715339 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Installing Docker on Arch Linux

> Mon 7th March 2022 By David T. Sadler.

## Installing Docker

Docker is installed via pacman.

```shell
$ sudo pacman -S docker
```

## Starting Docker Engine

Start the Docker daemon which provides the Docker Engine. This process serves the Docker API and manages Docker containers.

```shell
$ sudo systemctl start docker.service
```

If you want Docker Engine to automatically start when you system boots issue the below command.

```shell
$ sudo systemctl enable docker.service
```

Verify that Docker Engine is running.

```shell
$ docker info
```

Verify that you can run containers. The below will download the latest Arch Linux image and use it to run a "Hello World" bash script in the container.

```shell
$ docker run -it --rm archlinux bash -c "echo Hello World"
```

## Problems 

You may get an error when running docker info.

```shell
$ docker info

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/json: dial unix /var/run/docker.sock: connect: permission denied
```

The issue is that the user you're running the docker command as is not a member of the docker group. Therefore you can either run the command via sudo or add your user to the docker user group, re-login, and restart docker.service.

### Links

=> /posts/docker/ Docker - Read More Posts.

I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.

=> mailto:david@davidtsadler.com Email david@davidtsadler.com

### License

=> https://creativecommons.org/licenses/by-sa/4.0/ The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Copyright © 2021 David T. Sadler.

=> / Return to Homepage.