aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/md/docker/docker-101.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/doc/md/docker/docker-101.md b/doc/md/docker/docker-101.md
index 271dcd5b..35a68774 100644
--- a/doc/md/docker/docker-101.md
+++ b/doc/md/docker/docker-101.md
@@ -84,6 +84,11 @@ Note the names and ID's of containers are list in ``docker ps``. You an even typ
84 84
85Access can also be through one or more network ports, or disk volumes. Both are specified on and fixed on ``docker create`` or ``run``. 85Access can also be through one or more network ports, or disk volumes. Both are specified on and fixed on ``docker create`` or ``run``.
86 86
87You can view the console output of the main container process too:
88```bash
89$ docker logs -f <container-name-or-id>
90```
91
87### Docker disk use 92### Docker disk use
88Trying out different images can fill some gigabytes of disk quickly. Besides images, the docker volumes usually take up most disk space. 93Trying out different images can fill some gigabytes of disk quickly. Besides images, the docker volumes usually take up most disk space.
89 94
@@ -93,3 +98,45 @@ If you care only about trying out docker and not about what is running or saved,
93$ docker rmi -f $(docker images -aq) # remove or mark all images for disposal 98$ docker rmi -f $(docker images -aq) # remove or mark all images for disposal
94$ docker volume rm $(docker volume ls -q) # remove all volumes 99$ docker volume rm $(docker volume ls -q) # remove all volumes
95``` 100```
101
102### SystemD config
103Systemd is the process manager of choice on ubuntu. Once you have a ``docker`` service installed, you can add use the following steps to set up Shaarli to run on system start.
104
105```bash
106systemctl enable /etc/systemd/system/docker.shaarli.service
107systemctl start docker.shaarli
108systemctl status docker.*
109journalctl -f # inspect system log if needed
110```
111
112You will need sudo or a root terminal to perform some or all of the steps above. Here are the contents for the service file:
113```
114[Unit]
115Description=Shaarli Bookmark Manager Container
116After=docker.service
117Requires=docker.service
118
119
120[Service]
121Restart=always
122
123# Put any environment you want in here, like $host- or $domainname in this example
124EnvironmentFile=/etc/sysconfig/box-environment
125
126# It's just an example..
127ExecStart=/usr/bin/docker run \
128 -p 28010:80 \
129 --name ${hostname}-shaarli \
130 --hostname shaarli.${domainname} \
131 \
132 -v /srv/docker-volumes-local/shaarli-data:/var/www/shaarli/data:rw \
133 -v /etc/localtime:/etc/localtime:ro \
134 \
135 shaarli/shaarli:latest
136
137ExecStop=/usr/bin/docker rm -f ${hostname}-shaarli
138
139
140[Install]
141WantedBy=multi-user.target
142```