blob: 54b996b1887c4aecdffd52fd0133ab0ec2ec261b (
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
|
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Installing Docker on Arch Linux</title>
<link rel="shortcut icon" href="/images/favicon.png">
<link rel="stylesheet" href="/css/site.css">
<link href="/posts/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts"/>
<link href="/posts/arch/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Arch"/>
<link href="/posts/gemini/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Gemini"/>
<link href="/posts/jigsaw/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Jigsaw"/>
<link href="/posts/laravel/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Laravel"/>
<link href="/posts/linux/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Linux"/>
<link href="/posts/markdown/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Markdown"/>
<link href="/posts/netlify/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Netlify"/>
<link href="/posts/nextcloud/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Nextcloud"/>
<link href="/posts/php/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About PHP"/>
</head>
<body>
<section><h1>Installing Docker on Arch Linux</h1><blockquote>Mon 7th March 2022 By David T. Sadler.</blockquote><h2>Installing Docker</h2><p>Docker is installed via pacman.</p><pre><code class="shell">$ sudo pacman -S docker</code></pre><h2>Starting Docker Engine</h2><p>Start the Docker daemon which provides the Docker Engine. This process serves the Docker API and manages Docker containers.</p><pre><code class="shell">$ sudo systemctl start docker.service</code></pre><p>If you want Docker Engine to automatically start when you system boots issue the below command.</p><pre><code class="shell">$ sudo systemctl enable docker.service</code></pre><p>Verify that Docker Engine is running.</p><pre><code class="shell">$ docker info</code></pre><p>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.</p><pre><code class="shell">$ docker run -it --rm archlinux bash -c "echo Hello World"</code></pre><h2>Problems </h2><p>You may get an error when running docker info.</p><pre><code class="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</code></pre><p>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.</p><h3>Links</h3><a href="/posts/docker/">Docker - Read More Posts.</a><p>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.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="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.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a></section>
<script defer src="/js/highlight.min.js"></script>
<script defer src="/js/site.js"></script>
</body>
</html>
|