-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
43 lines (35 loc) · 869 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
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM alpine:latest
# environment
ENV MIRROR=http://mirrors.cloud.tencent.com/alpine
ENV PACKAGES=alpine-baselayout,\
alpine-keys,\
apk-tools,\
busybox,\
libc-utils,\
xz
ENV OPENAI_API_KEY=
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.cloud.tencent.com/g' /etc/apk/repositories && \
apk update && \
apk add --no-cache \
shadow \
gcc \
g++ \
python3-dev \
python3 && \
python3 -m ensurepip && \
pip3 install -i https://mirrors.cloud.tencent.com/pypi/simple openai flask flask_cors && \
apk del --purge \
python3-dev \
g++ \
gcc && \
rm -rf /root/.cache /tmp/* && \
echo "**** create abc user and make our folders ****" && \
groupmod -g 1000 users && \
useradd -u 911 -U -d /workdir -s /bin/sh abc && \
usermod -G users abc && \
mkdir -p /workdir
COPY shell/init.sh /
COPY chatgetweb/ /workdir
VOLUME /workdir/output
EXPOSE 8080
ENTRYPOINT ["/bin/sh", "/init.sh"]