Skip to content

Commit

Permalink
readme: Add Docker readme and rename module to kernelcollector
Browse files Browse the repository at this point in the history
  • Loading branch information
darktohka committed Sep 17, 2020
1 parent 48af811 commit 6f42f79
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ WORKDIR /srv

RUN \
# Create user
addgroup -g 423 -S pkgcollector \
&& adduser -u 423 -S pkgcollector -G pkgcollector \
addgroup -g 423 -S kernelcollector \
&& adduser -u 423 -S kernelcollector -G kernelcollector \
# Upgrade system
&& apk update \
&& apk upgrade --no-cache \
&& apk add --no-cache dpkg gnupg gzip fakeroot xz tar \
# Install Python dependencies
&& pip install --no-cache --upgrade -r requirements.txt \
&& chown -R pkgcollector:pkgcollector . \
&& chown -R kernelcollector:kernelcollector . \
# Cleanup
&& rm -rf /tmp/* /var/cache/apk/*

USER pkgcollector
ENTRYPOINT ["python", "-m", "pkgcollector.Main"]
USER kernelcollector
ENTRYPOINT ["python", "-m", "kernelcollector.Main"]
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,27 @@ And that's all there's to it! You might want to publish your GPG keys to a key s
```
gpg --keyserver keyserver.ubuntu.com --send-keys ABCDEFGH
```


## Docker Guide

KernelCollector can be ran using Docker. First, build the image.

```
git clone [email protected]:darktohka/KernelCollector .
docker build . -t kernelcollector
```

To run the image straight from Docker Hub, pull the image from there instead.

```
docker pull darktohka/kernelcollector:latest
```

Next, run the image inside a container. Make sure to mount your GPG directory:

```
chown 423:423 settings.json cache.json
chown -R 423:423 packages
docker run -d --name kernelcollector -v "$(pwd)/cache.json:/srv/cache.json" -v "$(pwd)/settings.json:/srv/settings.json" -v "$(pwd)/packages:/srv/packages" -v "$HOME/.gnupg:/home/kernelcollector/.gnupg" kernelcollector
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
parent_path=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P )
cd "$parent_path"

python3 -m pkgcollector.Main
python3 -m kernelcollector.Main

0 comments on commit 6f42f79

Please sign in to comment.