docker: move to alpine
This commit is contained in:
parent
ab472daf5e
commit
85a53b4e53
2 changed files with 10 additions and 7 deletions
12
Dockerfile
12
Dockerfile
|
@ -1,4 +1,4 @@
|
|||
FROM python:3.7
|
||||
FROM python:3.7-alpine
|
||||
|
||||
ARG hostuid=1000
|
||||
ARG hostgid=1000
|
||||
|
@ -6,6 +6,8 @@ ARG hostgid=1000
|
|||
ENV TECHREC_CONFIG=/src/techrec/docker/config.py
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apk update && apk add ffmpeg shadow
|
||||
|
||||
WORKDIR /src
|
||||
COPY . /src/techrec
|
||||
|
||||
|
@ -13,10 +15,7 @@ RUN groupadd -g ${hostgid} techrec \
|
|||
&& useradd -g techrec -u ${hostuid} -m techrec \
|
||||
&& mkdir -p /src/techrec \
|
||||
&& mkdir -p /src/db \
|
||||
&& chown -R techrec:techrec /src \
|
||||
&& apt-get -qq update \
|
||||
&& apt-get install -qq -y ffmpeg \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
&& chown -R techrec:techrec /src
|
||||
|
||||
USER techrec
|
||||
|
||||
|
@ -28,5 +27,4 @@ RUN python -m venv ./venv \
|
|||
VOLUME ["/src/db"]
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/src/venv/bin/techrec"]
|
||||
CMD ["-vv", "serve"]
|
||||
CMD ["/src/techrec/docker/run-techrec.sh"]
|
||||
|
|
5
docker/run-techrec.sh
Executable file
5
docker/run-techrec.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
source /src/venv/bin/activate
|
||||
pip install /src/techrec
|
||||
/src/venv/bin/techrec forge 20230330-210204 20230330-232100
|
||||
/bin/sh
|
Loading…
Reference in a new issue