tomato/other/bootstrap_daemon/websocket/Dockerfile
Green Sky 227425b90e Squashed 'external/toxcore/c-toxcore/' content from commit 67badf69
git-subtree-dir: external/toxcore/c-toxcore
git-subtree-split: 67badf69416a74e74f6d7eb51dd96f37282b8455
2023-07-25 11:53:09 +02:00

30 lines
978 B
Docker

# Stage 1 - Compile websockify.
FROM toxchat/bootstrap-node:latest AS tox
FROM golang:1.17-alpine AS websockify
COPY websockify /work/websockify
RUN cd /work/websockify && go mod download github.com/gorilla/websocket && go install
# Stage 2 - Create the run-time image with bootstrap daemon and websockify.
FROM alpine:latest
RUN addgroup -S tox && adduser -SDH -G tox tox
COPY --from=websockify /go/bin/websockify /usr/local/bin/
COPY --from=tox /usr/local /usr/local/
COPY --from=tox /etc/tox-bootstrapd.conf /etc/
COPY entrypoint.sh /
RUN mkdir -p /var/lib/tox-bootstrapd/ /var/run/tox-bootstrapd/ \
&& chown tox:tox /var/lib/tox-bootstrapd/ /var/run/tox-bootstrapd/
# Public Key: 122837CCDD474DD1183A83152164D51427044B3EAAA52ED683F6BA602568673B
COPY keys /var/lib/tox-bootstrapd/
USER tox
# Use this to generate a keys file:
#RUN /usr/local/bin/tox-bootstrapd --config /etc/tox-bootstrapd.conf --log-backend stdout \
# && sleep 1
WORKDIR /web
CMD ["/entrypoint.sh"]