forked from motiv-labs/janus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (24 loc) · 828 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
####### Start from a golang base image ###############
FROM golang:1.13.6-buster as builder
LABEL maintainer="sunzhaocun grad design"
WORKDIR /app
COPY ./ ./
RUN go mod download
RUN make build
FROM ubuntu:20.04 as prod
COPY --from=builder /app/cassandra/schema.sql /usr/local/bin
COPY --from=builder /app/dist/janus /bin/janus
RUN chmod a+x /bin/janus && \
mkdir -p /etc/janus/apis && \
mkdir -p /etc/janus/auth
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/*
HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD curl -f http://localhost:8081/status || exit 1
# Use nobody user + group
USER 65534:65534
EXPOSE 8080 8081 8443 8444
ENTRYPOINT ["/bin/janus", "start"]
# just to have it
RUN ["/bin/janus", "--version"]