-
Notifications
You must be signed in to change notification settings - Fork 34
/
DockerfileDebian
55 lines (42 loc) · 1.73 KB
/
DockerfileDebian
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
44
45
46
47
48
49
50
51
52
53
54
55
FROM debian:latest as buildenv
RUN apt-get update \
&& apt-get install -y --no-install-recommends gcc protobuf-c-compiler build-essential git zip curl
COPY . /buildenv
WORKDIR /buildenv
RUN curl -f https://raw.githubusercontent.com/toniebox-reverse-engineering/tonies-json/release/tonies.json -o /buildenv/contrib/config/tonies.json || true
RUN curl -f https://raw.githubusercontent.com/toniebox-reverse-engineering/tonies-json/release/tonieboxes.json -o /buildenv/contrib/config/tonieboxes.json || true
RUN make zip
FROM debian:latest
EXPOSE 80 443 8443
RUN apt-get update \
&& apt-get install -y --no-install-recommends libubsan1 ffmpeg curl ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN update-ca-certificates
RUN mkdir -p /teddycloud/certs \
&& mkdir /teddycloud/config \
&& mkdir -p /teddycloud/data/content/default \
&& mkdir -p /teddycloud/data/library \
&& mkdir -p /teddycloud/data/firmware \
&& mkdir -p /teddycloud/data/www \
&& mkdir -p /teddycloud/data/cache \
&& mkdir -p /tmp
RUN ln -s /teddycloud /etc/teddycloud
COPY --from=buildenv \
/buildenv/install/pre/certs/ /teddycloud/certs/
COPY --from=buildenv \
/buildenv/install/pre/data/www/ /teddycloud/data/www/
COPY --from=buildenv \
/buildenv/install/pre/*.sh /usr/local/bin/
COPY --from=buildenv \
/buildenv/install/pre/teddycloud /usr/local/bin/teddycloud
COPY --from=buildenv /buildenv/install/zip/release.zip /tmp/teddycloud.zip
VOLUME \
"/teddycloud/data/content" \
"/teddycloud/data/library" \
"/teddycloud/data/firmware" \
"/teddycloud/data/cache" \
"/teddycloud/certs" \
"/teddycloud/config"
COPY docker/docker-entrypoint.sh /
RUN chmod +rx /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]