forked from emitter-io/emitter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (22 loc) · 769 Bytes
/
Dockerfile
File metadata and controls
28 lines (22 loc) · 769 Bytes
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
LABEL MAINTAINER="roman@misakai.com"
# Copy the directory into the container outside of the gopath
RUN mkdir -p /go-build/src/github.com/emitter-io/emitter/
WORKDIR /go-build/src/github.com/emitter-io/emitter/
ADD . /go-build/src/github.com/emitter-io/emitter/
# Download and install any required third party dependencies into the container.
RUN apk add --no-cache git 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"]