Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoikLectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Goik Martin
GoikLectures
Commits
ae792801
Commit
ae792801
authored
6 years ago
by
Goik Martin
Browse files
Options
Downloads
Patches
Plain Diff
Nextcloud + MariaDB service
parent
b80262c4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Doc/Sdi/docker.xml
+138
-2
138 additions, 2 deletions
Doc/Sdi/docker.xml
with
138 additions
and
2 deletions
Doc/Sdi/docker.xml
+
138
−
2
View file @
ae792801
...
...
@@ -301,12 +301,29 @@ Deleted: sha256:2c833f307fd8f18a378b71d3c43c575fabdb88955a2198662938ac2a08a99928
<figure
xml:id=
"sdiDocker_figListContainer"
>
<title>
List running containers
</title>
<screen>
>
docker ps -a
<screen>
>
docker ps -a
<emphasis
role=
"red"
>
# show stopped containers as well
</emphasis>
CONTAINER ID IMAGE COMMAND ... PORTS NAMES
517e3dba4887 nextcloud "/entrypoint.sh apac…" ... 0.0.0.0:8080-
>
80/tcp
<emphasis
role=
"red"
>
nc13
</emphasis></screen>
</figure>
<figure
xml:id=
"sdiDocker_enterRunningContainer"
>
<title>
Enter running container
</title>
<screen>
>
docker exec -it nextcloud_db_1 /bin/bash
# ls -al
total 84
drwxr-xr-x 1 root root 4096 Jun 20 09:28 .
drwxr-xr-x 1 root root 4096 Jun 20 09:28 ..
-rwxr-xr-x 1 root root 0 Jun 20 09:28 .dockerenv
drwxr-xr-x 1 root root 4096 May 25 20:20 bin
drwxr-xr-x 2 root root 4096 Nov 19 2017 boot
drwxr-xr-x 5 root root 340 Jun 20 09:28 dev
drwxr-xr-x 2 root root 4096 Apr 30 15:37 docker-entrypoint-initdb.d
lrwxrwxrwx 1 root root 34 May 25 20:20 docker-entrypoint.sh -
>
usr/local/bin/docker-entrypoint.sh
...
</screen>
</figure>
<figure
xml:id=
"sdiDocker_figKillProcess"
>
<title>
Remove container
</title>
...
...
@@ -317,6 +334,49 @@ nc13</screen>
CONTAINER ID IMAGE COMMAND CREATED STATUS ... NAMES
</screen>
</figure>
</section>
<section
xml:id=
"sdiDocker_volumes_sect"
>
<title>
Volumes
</title>
<figure
xml:id=
"sdiDocker_listVolumes"
>
<title>
List volumes
</title>
<informaltable
border=
"0"
>
<tr>
<td
valign=
"top"
><screen>
>
docker volume ls
DRIVER VOLUME NAME
local nextcloud_db
local nextcloud_nextcloud
</screen></td>
<td
valign=
"top"
><screen>
# ls -al /var/lib/docker/volumes
total 40
drwx------ 4 root root 4096 Jun 20 11:13 .
drwx--x--x 14 root root 4096 Jun 20 09:40 ..
-rw------- 1 root root 32768 Jun 20 11:13 metadata.db
drwxr-xr-x 3 root root 4096 Jun 20 11:13 nextcloud_db
drwxr-xr-x 3 root root 4096 Jun 20 11:13 nextcloud_nextcloud
</screen></td>
</tr>
</informaltable>
</figure>
<figure
xml:id=
"sdiDocker_listOrphaneVolumes"
>
<title>
List orphaned volumes
</title>
<screen>
>
docker volume ls
<emphasis
role=
"red"
>
-f dangling=true
</emphasis>
DRIVER VOLUME NAME
local nextcloud_db
local nextcloud_nextcloud
</screen>
</figure>
<figure
xml:id=
"sdiDocker_removeVolume"
>
<title>
Remove volumes
</title>
<screen>
>
docker volume rm nextcloud_db nextcloud_nextcloud
nextcloud_db
nextcloud_nextcloud
</screen>
</figure>
</section>
</section>
<section
xml:id=
"sdiDocker_sect_exercises"
>
...
...
@@ -325,6 +385,82 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS
<para>
In this exercise you are about to replace your package based
<productname>
Nextcloud
</productname>
installation by a
<productname>
Docker
</productname>
container based on an already existing
image.
</para>
image. The image is being described at:
</para>
<blockquote>
<para><uri
xlink:href=
"https://github.com/nextcloud/docker"
>
https://github.com/nextcloud/docker
</uri></para>
</blockquote>
<section
xml:id=
"sdiDocker_installNcSimple"
>
<title>
The simple way: Using SQLite
</title>
<orderedlist>
<listitem>
<para>
Prepare your system for using docker.
</para>
</listitem>
<listitem>
<para>
Read the
<link
xlink:href=
"https://github.com/nextcloud/docker"
>
Nextcloud docker
image documentation
</link>
.
</para>
</listitem>
<listitem>
<para>
Pull the
<code>
nextcloud
</code>
container and start it
according to the documentation mapping port 80 to 8080 of your host
system.
</para>
<para>
Use
<command>
ssh ... -L 8080:localhost:8080
</command>
forwarding the port in question to your local system and direct your
web browser to
<uri
xlink:href=
"http://localhost:8080"
>
http://localhost:8080
</uri>
.
</para>
</listitem>
<listitem>
<para>
Continue the installation by entering admin/admin for username
and password.
</para>
</listitem>
</orderedlist>
</section>
<section
xml:id=
"sdiDocker_installNcMaria"
>
<title>
The real McCoy: Using
<productname>
Mariadb
</productname></title>
<para><productname>
SQLite
</productname>
is not appropriate for (larger)
production systems. We thus replace it by a
<productname>
mariadb
</productname>
service.
</para>
<orderedlist>
<listitem>
<para>
Drop the existing containers among with their volumes.
</para>
</listitem>
<listitem>
<para>
Follow
<uri
xlink:href=
"https://github.com/nextcloud/docker#user-content-base-version---apache"
>
https://github.com/nextcloud/docker#user-content-base-version---apache
</uri>
.
Create the proposed
<filename>
docker-compose.yml
</filename>
file.
Enter require credentials and start the container using
<command
xlink:href=
"https://docs.docker.com/compose"
>
docker-compose
</command>
<parameter>
up
</parameter>
.
</para>
</listitem>
<listitem>
<para>
This time we choose
<productname>
Mariadb
</productname>
as
database server. Connect to
<uri
xlink:href=
"http://localhost:8080"
>
http://localhost:8080
</uri>
again. Use the database server's container ID as hostname parameter
allowing for access by the
<productname>
nextcloud
</productname>
container. Then fill in the remaining required connection parameter
values.
</para>
</listitem>
<listitem>
<para>
Now configure
<uri>
ldap://ldap1.hdm-stuttgart.de
</uri>
as your
credential provider like you did in your regular
<productname>
Nextcloud
</productname>
installation before.
</para>
</listitem>
</orderedlist>
</section>
</section>
</chapter>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment