Skip to content

Commit c02300f

Browse files
author
Patrick M
committed
add docker setup
1 parent 1fd9336 commit c02300f

File tree

4 files changed

+70
-4
lines changed

4 files changed

+70
-4
lines changed

_posts/2022-12-18-lxc-plex-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: post
3-
title: 'Setting up Plex'
3+
title: 'LXC: Setting up Plex'
44
date: 2022-12-18 23:00:00 -0500
55
category: 'Service Setup'
66
tags: ['plex']
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
layout: post
3-
title: 'LXC: First commands on a new CT'
3+
title: 'LXC: First commands on a new Debian CT'
44
date: 2022-12-18 00:00:00 -0500
55
category: 'Service Setup'
6-
tags: ['proxmox', 'lxc']
6+
tags: ['proxmox', 'lxc', 'debian']
77
---
88

9-
A list of the first commands I run on a new LXC to homogenize and secure my new environment.
9+
A list of the first commands I run on a new Debian LXC to homogenize and secure my new environment.
1010

1111
<!--more-->
1212

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
layout: post
3+
title: 'LXC: Installing Docker on a Debian CT'
4+
date: 2023-1-1 12:00:00 -0500
5+
category: 'Service Setup'
6+
tags: ['proxmox', 'lxc', 'debian', 'docker']
7+
---
8+
9+
A quick guide to getting docker running on a Debian CT
10+
11+
<!--more-->
12+
13+
## CT Configuration
14+
15+
First make sure your container is running in privledged mode and nested is enabled in Options > Features
16+
17+
![features](/assets/img/lxc-docker-setup-1.png)
18+
19+
## Installing Docker
20+
21+
Then you'll need to login and install docker.
22+
23+
```bash
24+
sudo apt install docker.io -y && sudo systemctl enable docker
25+
```
26+
27+
Then start and confirm the service
28+
29+
```bash
30+
sudo systemctl start docker && sudo systemctl status docker
31+
```
32+
33+
To ensure Docker is running correctly you can try to run a simple hello-world container
34+
35+
```bash
36+
sudo docker run hello-world
37+
```
38+
39+
## Install Docker Compose
40+
41+
Debian unfortunately only ships with docker compose v1. The plugin for v2 needs to be installed manually from github releases. Keep in mind the version number can be whatever is the latest (v2.14.2 as of this post).
42+
43+
```bash
44+
mkdir -p ~/.docker/cli-plugins
45+
```
46+
47+
```bash
48+
curl -sSL https://github.com/docker/compose/releases/download/v2.14.2/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
49+
```
50+
51+
```bash
52+
chmod +x ~/.docker/cli-plugins/docker-compose
53+
```
54+
55+
Now check to make sure v2 is installed
56+
57+
```bash
58+
docker compose version
59+
# Docker Compose version 2.14.2
60+
```
61+
62+
## Run Docker from a non-root user without sudo
63+
64+
```bash
65+
sudo usermod -aG docker $USER
66+
```

assets/img/lxc-docker-setup-1.png

28 KB
Loading

0 commit comments

Comments
 (0)