2020-05-20 00:06:08 +02:00
|
|
|
FROM golang:1.13 as builder
|
|
|
|
|
|
|
|
# Copy local code to the container image.
|
|
|
|
WORKDIR /tile38
|
|
|
|
COPY . .
|
|
|
|
COPY ./cmd/tile38-server/main.go .
|
|
|
|
|
|
|
|
# Build the command inside the container.
|
|
|
|
# (You may fetch or manage dependencies here,
|
|
|
|
# either manually or with a tool like "godep".)
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -v -o tile38-server
|
|
|
|
|
2018-11-30 13:51:42 -07:00
|
|
|
FROM alpine:3.8
|
2018-11-30 12:06:08 -07:00
|
|
|
RUN apk add --no-cache ca-certificates
|
2016-10-20 09:08:38 -05:00
|
|
|
|
2020-05-20 00:06:08 +02:00
|
|
|
COPY --from=builder /tile38/tile38-server /usr/local/bin/tile38-server
|
|
|
|
#ADD tile38-cli /usr/local/bin
|
|
|
|
#ADD tile38-benchmark /usr/local/bin
|
2016-10-20 09:08:38 -05:00
|
|
|
|
2018-04-24 08:39:29 +02:00
|
|
|
RUN addgroup -S tile38 && \
|
|
|
|
adduser -S -G tile38 tile38 && \
|
|
|
|
mkdir /data && chown tile38:tile38 /data
|
2016-10-20 09:08:38 -05:00
|
|
|
|
|
|
|
VOLUME /data
|
|
|
|
|
|
|
|
EXPOSE 9851
|
2018-04-24 08:39:29 +02:00
|
|
|
CMD ["tile38-server", "-d", "/data"]
|