forked from toniebox-reverse-engineering/teddycloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (31 loc) · 1.05 KB
/
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
FROM ubuntu:latest as buildenv
RUN apt-get update \
&& apt-get install -y --no-install-recommends gcc protobuf-c-compiler build-essential \
&& rm -rf /var/lib/apt/lists/*
COPY . /buildenv
WORKDIR /buildenv
RUN make preinstall
FROM ubuntu:latest
EXPOSE 80 443
RUN apt-get update \
&& apt-get install -y --no-install-recommends faketime openssl \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /teddycloud/certs/server \
&& mkdir -p /teddycloud/www/CONTENT \
&& mkdir /teddycloud/config
COPY --from=buildenv \
/buildenv/install/pre/certs/ /teddycloud/certs/
COPY --from=buildenv \
/buildenv/install/pre/www/ /teddycloud/www/
COPY --from=buildenv \
/buildenv/install/pre/*.sh /usr/local/bin/
COPY --from=buildenv \
/buildenv/install/pre/teddycloud /usr/local/bin/teddycloud
VOLUME [ \
"/teddycloud/www/CONTENT", \
"/teddycloud/certs", \
"/teddycloud/config", \
]
COPY docker/docker-entrypoint.sh /usr/local/bin/
RUN chmod +rx /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]