forked from sjkhsl/study_xxqg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (22 loc) · 998 Bytes
/
Dockerfile
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
30
FROM ubuntu:jammy
ARG DEBIAN_FRONTEND=noninteractive
ARG TARGETARCH
ARG TZ="Asia/Shanghai"
RUN apt-get -qq update && \
apt-get -qq install -y --no-install-recommends tzdata ca-certificates libglib2.0-0 libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \
libdbus-1-3 libexpat1 libxcb1 libxkbcommon0 libx11-6 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 \
libcairo2 libasound2 libatspi2.0-0 && \
ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo ${TZ} > /etc/timezone && \
dpkg-reconfigure --frontend noninteractive tzdata &&\
rm -rf /var/lib/apt/lists/* && \
mkdir /opt/config/
COPY conf/config_default.yml /opt/config/config.yml
COPY conf/QuestionBank.db /opt/QuestionBank.db
COPY ./dist/docker_linux_$TARGETARCH*/study_xxqg /opt/study_xxqg
RUN chmod -R 777 /opt/study_xxqg && \
cd /opt/ && \
./study_xxqg --init
EXPOSE 8080
VOLUME /opt/config
CMD cd /opt && ./study_xxqg