mirror of
https://github.com/miaowware/qrm2.git
synced 2024-11-21 23:45:16 -05:00
move to new void docker image, clean up dockerfile (#436)
Co-authored-by: 0x5c <dev@0x5c.io>
This commit is contained in:
parent
8f1782dcc0
commit
80d6a989cc
23
Dockerfile
23
Dockerfile
@ -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"
|
||||
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} python3 python3-pip && \
|
||||
echo "**** install pip packages ****" && \
|
||||
pip3 install -U pip setuptools wheel && \
|
||||
pip3 install -r requirements.txt && \
|
||||
@ -21,10 +23,9 @@ RUN \
|
||||
/tmp/* \
|
||||
/var/cache/xbps/*
|
||||
|
||||
ARG UID
|
||||
ENV UID=${UID:-1000}
|
||||
ARG GID
|
||||
ENV GID=${GID:-1000}
|
||||
ENV PYTHON_BIN python3
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
USER $UID:$GID
|
||||
|
||||
CMD ["/bin/sh", "run.sh", "--pass-errors", "--no-botenv"]
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user