-
Notifications
You must be signed in to change notification settings - Fork 27
/
README.docker
30 lines (17 loc) · 976 Bytes
/
README.docker
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
28
29
For development purposes, a Dockerfile is included. To build a Docker container, install and run Docker daemon first:
dnf -y install docker
systemctl start docker
- make sure you're in the top level directory (the one that contains Dockerfile)
- cd into this directory and build the image as `sclorgweb` (this will take some time):
docker build -t sclorgweb .
- after build is finished, run the resulting image:
docker run --name scloorgwebtest -P -d -t -v $(pwd):/srv/softwarecollections:z sclorgweb
- this will print a hash of new container
- get IP address of the new container:
docker inspect -format='{{.NetworkSettings.IPAddress}}' scloorgwebtest
- attach to the image to see the output of testing server:
docker attach scloorgwebtest
- develop (code is mounted in container, so you can code locally)
- when done developing, stop the container:
docker stop <container_hash>
- if you want to prune DB, just remove data/db.sqlite3