You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/containers/podman-nextcloud.md
+36-36Lines changed: 36 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,83 +12,83 @@ tags:
12
12
13
13
## Introduction
14
14
15
-
This document explains all the required steps needed to build and run a [Nextcloud](https://nextcloud.com) instance as a Podman container on Rocky Linux. What's more, this entire guide was tested on a Raspberry Pi, so it should be compatible with every Rocky-supported processor architecture.
15
+
This document explains all the required steps needed to build and run a [Nextcloud](https://nextcloud.com) instance as a Podman container on Rocky Linux. What is more, this entire guide was tested on a Raspberry Pi, so it should be compatible with every Rocky-supported processor architecture.
16
16
17
17
The procedure is broken down into multiple steps, each with its own shell scripts for automation:
18
18
19
19
1. Installing the `podman` and `buildah` packages to manage and build our containers, respectively
20
-
2. Creating a base image which will be repurposed for all of the containers we'll need
20
+
2. Creating a base image that will be repurposed for all of the containers we will need
21
21
3. Creating a `db-tools` container image with the required shell scripts for building and running your MariaDB database
22
22
4. Creating and running MariaDB as a Podman container
23
23
5. Creating and running Nextcloud as a Podman container, using the MariaDB Podman container as backend
24
24
25
-
You could run most of the commands in the guide manually, but setting up a few bash scripts will make your life a lot easier, especially when you want to repeat these steps with different settings, variables, or container names.
25
+
You could run most of the commands in the guide manually, but setting up a few bash scripts will make your life much easier, especially when you want to repeat these steps with different settings, variables, or container names.
26
26
27
27
!!! Note "Note for Beginners:"
28
28
29
-
Podman is tool for managing containers, specifically OCI (Open Containers Initiative) containers. It's designed to be pretty much Docker-compatible, in that most if not all of the same commands will work for both tools. If "Docker" means nothing to you—or even if you're just curious—you can read more about Podman and how it works on [Podman's own website](https://podman.io).
29
+
Podman is a tool for managing containers, specifically OCI (Open Containers Initiative) containers. It is designed to be pretty much Docker-compatible, in that most if not all of the same commands will work for both tools. If "Docker" means nothing to you—or even if you were just curious—you can read more about Podman and how it works on [Podman's own website](https://podman.io).
30
30
31
31
`buildah` is a tool that builds Podman container images based on "DockerFiles".
32
32
33
33
This guide was designed as an exercise to help people get familiar with running Podman containers in general, and on Rocky Linux specifically.
34
34
35
-
## Prerequisites and Assumptions
35
+
## Prerequisites and assumptions
36
36
37
-
Here's everything you'll need, or need to know, in order to make this guide work:
37
+
Here is everything you will need, or need to know, to make this guide work:
38
38
39
39
* Familiarity with the command line, bash scripts, and editing Linux configuration files.
40
40
* SSH access if working on a remote machine.
41
-
* A command-line based text editor of your choice. We'll be using `vi` for this guide.
41
+
* A command-line based text editor of your choice. We will be using `vi` for this guide.
42
42
* An internet-connected Rocky Linux machine (again, a Raspberry Pi will work nicely).
43
-
* Many of these commands must be run as root, so you'll need a root or sudo-capable user on the machine.
43
+
* Many of these commands must be run as root, so you will need a root or sudo-capable user on the machine.
44
44
* Familiarity with web servers and MariaDB would definitely help.
45
45
* Familiarity with containers and maybe Docker would be a *definite* plus, but is not strictly essential.
46
46
47
47
## Step 01: Install `podman` and `buildah`
48
48
49
-
First, make sure your system is up-to-date:
49
+
First, ensure your system is up-to-date:
50
50
51
51
```bash
52
52
dnf update
53
53
```
54
54
55
-
Then you'll want to install the `epel-release` repository for all the extra packages we'll be using.
55
+
Then you will want to install the `epel-release` repository for all the extra packages we will be using.
56
56
57
57
```bash
58
58
dnf -y install epel-release
59
59
```
60
60
61
-
Once that's done, you can update again (which sometimes helps) or just go ahead and install the packages we need:
61
+
Once that is done, you can update again (which sometimes helps) or just go ahead and install the packages we need:
62
62
63
63
```bash
64
64
dnf -y install podman buildah
65
65
```
66
66
67
-
Once they're installed, run `podman --version` and `buildah --version` to make sure everything is working correctly.
67
+
Once they are installed, run `podman --version` and `buildah --version` to ensure everything is working correctly.
68
68
69
-
To access Red Hat's registry for downloading container images, you'll need to run:
69
+
To access Red Hat's registry for downloading container images, you will need to run:
70
70
71
71
```bash
72
72
vi /etc/containers/registries.conf
73
73
```
74
74
75
-
Find the section that looks like what you see below. If it's commented out, uncomment it.
75
+
Find the section that looks like what you see below. If it is commented out, uncomment it.
In this guide, we're working as the root user, but you can do this in any home directory. Change to the root directory if you're not already there:
85
+
In this guide, we are working as the root user, but you can do this in any home directory. Change to the root directory if you are not already there:
86
86
87
87
```bash
88
88
cd /root
89
89
```
90
90
91
-
Now make all of the directories you'll need for your various container builds:
91
+
Now make all of the directories you will need for your various container builds:
92
92
93
93
```bash
94
94
mkdir base db-tools mariadb nextcloud
@@ -156,18 +156,18 @@ And run it:
156
156
./build.sh
157
157
```
158
158
159
-
Wait until it's done, and move on to the next step.
159
+
Wait until it is done, and move on to the next step.
160
160
161
-
## Step 03: Create the `db-tools`Container Image
161
+
## Step 03: Create the `db-tools`container image
162
162
163
-
For the purposes of this guide, we're keeping the database setup as simple as we can. You'll want to keep track of the following, and modify them as needed:
163
+
For the purposes of this guide, we are keeping the database setup as simple as we can. You will want to keep track of the following, and modify them as needed:
164
164
165
165
* Database name: ncdb
166
166
* Database user: nc-user
167
167
* Database pass: nc-pass
168
-
* Your server IP address (we'll be using an example IP below)
168
+
* Your server IP address (we will be using an example IP below)
169
169
170
-
First, change to the folder where you'll be building the db-tools image:
170
+
First, change to the folder where you will be building the db-tools image:
171
171
172
172
```bash
173
173
cd /root/db-tools
@@ -206,7 +206,7 @@ flush privileges;
206
206
eof
207
207
```
208
208
209
-
Lastly, let's setup the DockerFile for the `db-tools` image:
209
+
Lastly, setup the DockerFile for the `db-tools` image:
210
210
211
211
```bash
212
212
vi Dockerfile
@@ -228,7 +228,7 @@ And last but not least, create the bash script to build your image on command:
228
228
vi build.sh
229
229
```
230
230
231
-
The code you'll want:
231
+
The code you will want:
232
232
233
233
```
234
234
#!/bin/bash
@@ -252,7 +252,7 @@ And run it:
252
252
253
253
## Step 04: Create the MariaDB container image
254
254
255
-
You're getting the hang of the process, right? It's time to build that actual database container. Change the working directory to `/root/mariadb`:
255
+
You are getting the hang of the process, right? It is time to build that actual database container. Change the working directory to `/root/mariadb`:
256
256
257
257
```bash
258
258
cd /root/mariadb
@@ -264,7 +264,7 @@ Make a script to (re)build the container whenever you want:
Now, we're going to set up a bunch of local folders on the host server (*not* in any Podman container), so that we can rebuild our containers and databases without fear of losing all of our files:
386
+
Now, we are going to set up a bunch of local folders on the host server (*not* in any Podman container), so that we can rebuild our containers and databases without fear of losing all of our files:
Lastly, we're going to create the script that will actually build the Nextcloud container for us:
392
+
Lastly, we are going to create the script that will actually build the Nextcloud container for us:
393
393
394
394
```bash
395
395
vi run.sh
396
396
```
397
397
398
-
And here's all the code you need for that. Make sure you change the IP address for `MYSQL_HOST` to the docker container that's running your MariaDB instance.
398
+
And here is all the code you need for that. Ensure you change the IP address for `MYSQL_HOST` to the docker container that is running your MariaDB instance.
399
399
400
400
```
401
401
#!/bin/bash
@@ -427,7 +427,7 @@ chmod +x *.sh
427
427
./build.sh
428
428
```
429
429
430
-
To make sure all of your images have been built correctly, run `podman images`. You should see a list that looks like this:
430
+
To ensure all of your images have been built correctly, run `podman images`. You should see a list that looks like this:
0 commit comments