forked from emitter-io/emitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (22 loc) · 709 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
FROM golang:alpine AS builder
MAINTAINER Roman Atachiants "[email protected]"
# Copy the directory into the container.
RUN mkdir -p /go/src/github.com/emitter-io/emitter/
WORKDIR /go/src/github.com/emitter-io/emitter/
ADD . /go/src/github.com/emitter-io/emitter/
# Download and install any required third party dependencies into the container.
RUN apk add --no-cache g++ \
&& go install \
&& apk del g++
# Base image for runtime
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
# Get the executable binary from build-img declared previously
COPY --from=builder /go/bin/emitter .
# Expose emitter ports
EXPOSE 4000
EXPOSE 8080
EXPOSE 8443
# Start the broker
CMD ["./emitter"]