forked from agones-dev/agones
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
24 lines (17 loc) · 693 Bytes
/
Copy pathdockerfile
File metadata and controls
24 lines (17 loc) · 693 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
# Gather dependencies and build the executable
FROM golang:1.10.3 as builder
WORKDIR /go/src/agones.dev
RUN git clone https://github.com/GoogleCloudPlatform/agones.git
WORKDIR /go/src/agones.dev/agones/examples/allocator-service
ADD ./main.go .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o service .
# Create the final image that will run the allocator service
FROM alpine:3.8
RUN apk add --update ca-certificates
RUN adduser -D service
COPY --from=builder /go/src/agones.dev/agones/examples/allocator-service \
/home/service
RUN chown -R service /home/service && \
chmod o+x /home/service/service
USER service
ENTRYPOINT /home/service/service