-
Notifications
You must be signed in to change notification settings - Fork 321
/
Dockerfile.dev
45 lines (33 loc) · 1.02 KB
/
Dockerfile.dev
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
# run this from the root of janus
FROM golang:1.14-alpine AS build-debug-common
ARG VERSION='0.0.1-docker'
WORKDIR /janus
COPY . ./
# Add tooling to install GCC
RUN apk add build-base
# Add cqlsh to the image.
RUN apk add --update \
bash \
curl \
py-pip
RUN go get github.com/go-delve/delve/cmd/[email protected]
RUN apk add --update bash make git
RUN export JANUS_BUILD_ONLY_DEFAULT=1 && \
export VERSION=$VERSION && \
make build
# ---
FROM alpine
COPY --from=build-debug-common /janus/dist/janus /
RUN apk add --no-cache ca-certificates
RUN mkdir -p /etc/janus/apis && \
mkdir -p /etc/janus/auth
RUN apk add --update curl && \
rm -rf /var/cache/apk/*
HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD curl -f http://localhost:8081/status || exit 1
FROM build-debug-common as dev
EXPOSE 8080 8081 8443 8444 40000
COPY entry-dev.sh /usr/local/bin
COPY cassandra/schema.sql /usr/local/bin
RUN chmod 755 /usr/local/bin/entry-dev.sh
ENTRYPOINT ["/usr/local/bin/entry-dev.sh"]
#ENTRYPOINT ["/janus", "start"]