move to new void docker image, clean up dockerfile

also updated docker readme
This commit is contained in:
classabbyamp 2021-10-30 18:22:55 -04:00
parent aefca97e4f
commit 63c2fa1a8e
No known key found for this signature in database
GPG Key ID: 6BE0755918A4C7F5
2 changed files with 16 additions and 18 deletions

View File

@ -1,17 +1,19 @@
FROM voidlinux/voidlinux
FROM ghcr.io/void-linux/void-linux:latest-mini-x86_64
LABEL org.opencontainers.image.source https://github.com/miaowware/qrm2
COPY . /app
WORKDIR /app
ENV PYTHON_BIN python3
ARG REPOSITORY=https://repo-us.voidlinux.org/current
ARG PKGS="cairo libjpeg-turbo python3 python3-pip"
ARG UID 1000
ARG GID 1000
RUN \
echo "**** update packages ****" && \
xbps-install -Suy && \
echo "**** update system ****" && \
xbps-install -SuyM -R ${REPOSITORY} && \
echo "**** install system packages ****" && \
export runtime_deps='cairo libjpeg-turbo' && \
export runtime_pkgs="${runtime_deps} python3-pip python3" && \
xbps-install -y $runtime_pkgs && \
xbps-install -yM -R ${REPOSITORY} ${PKGS} && \
echo "**** install pip packages ****" && \
pip3 install -U pip setuptools wheel && \
pip3 install -r requirements.txt && \
@ -21,10 +23,11 @@ RUN \
/tmp/* \
/var/cache/xbps/*
ARG UID
ENV UID=${UID:-1000}
ARG GID
ENV GID=${GID:-1000}
ENV PYTHON_BIN python3
ENV PYTHONUNBUFFERED 1
ENV UID ${UID:-1000}
ENV GID ${GID:-1000}
USER $UID:$GID
CMD ["/bin/sh", "run.sh", "--pass-errors", "--no-botenv"]

View File

@ -23,14 +23,11 @@ This is the easiest method for running the bot without any modifications.
version: '3'
services:
qrm2:
image: "docker.pkg.github.com/miaowware/qrm2/qrm2:latest"
image: "ghcr.io/miaowware/qrm2:latest"
restart: on-failure
volumes:
- "./data:/app/data:rw"
environment:
- PYTHONUNBUFFERED=1
```
*Note that Github's registry requires [a few extra steps](https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages) during the initial setup.*
3. Create a subdirectory named `data`.
@ -64,8 +61,6 @@ This is the easiest method to run the bot with modifications.
restart: on-failure
volumes:
- "./data:/app/data:rw"
environment:
- PYTHONUNBUFFERED=1
```
3. Create a subdirectory named `data`.
@ -112,4 +107,4 @@ This methods is not very nice to use.
Where `[image]` is either of:
- `qrm2:local-latest` if you are building your own.
- `docker.pkg.github.com/miaowware/qrm2/qrm2:latest` if you want to use the prebuilt image.
- `ghcr.io/miaowware/qrm2:latest` if you want to use the prebuilt image.