forked from muesli/beehive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (25 loc) · 980 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
35
36
FROM golang:alpine AS builder
LABEL authors="Gabriel Alacchi: [email protected], Christian Muehlhaeuser: [email protected]"
# Install git & make
# Git is required for fetching the dependencies
RUN apk update && \
apk add --no-cache git make ca-certificates && \
update-ca-certificates
# Set the working directory for the container
WORKDIR /go/beehive
# Build the binary
COPY . .
RUN make embed
FROM alpine
RUN apk update && \
apk add --no-cache ca-certificates tzdata && \
update-ca-certificates
COPY --from=builder /go/beehive/beehive /go/bin/beehive
# Where the admin interface will be served from
ENV CANONICAL_URL=http://localhost:8181
# Expose the application port
EXPOSE 8181
# create a volume for the configuration persistence
VOLUME /conf
# This form of ENTRYPOINT allows the beehive process to catch signals from the `docker stop` command
ENTRYPOINT /go/bin/beehive -config /conf/beehive.conf -bind 0.0.0.0:8181 -canonicalurl ${CANONICAL_URL}