-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (26 loc) · 1.04 KB
/
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
# Usage:
# ```
# $ docker run -d --rm --name locs_test u1and0/locate-server [options]
# ```
FROM golang:1.17.0-alpine3.14 AS go_official
RUN apk --update --no-cache add git &&\
go install github.com/u1and0/[email protected]
WORKDIR /go/src/github.com/u1and0/locate-server
# For go module using go-pipeline
ENV GO111MODULE=on
COPY ./main.go /go/src/github.com/u1and0/locate-server/main.go
COPY ./go.mod /go/src/github.com/u1and0/locate-server/go.mod
COPY ./go.sum /go/src/github.com/u1and0/locate-server/go.sum
COPY ./cmd /go/src/github.com/u1and0/locate-server/cmd
RUN go build -o /go/bin/locate-server
FROM frolvlad/alpine-glibc:alpine-3.14_glibc-2.33
RUN apk --update --no-cache add mlocate tzdata
WORKDIR /var/www
COPY --from=go_official /go/bin/locate-server /usr/bin/locate-server
COPY --from=go_official /go/bin/gocate /usr/bin/gocate
COPY ./static /var/www/static
COPY ./templates /var/www/templates
ENTRYPOINT ["/usr/bin/locate-server"]
LABEL maintainer="u1and0 <[email protected]>"\
description="Run locate-server"\
version="v3.0.0"