Skip to content

Commit 94c7762

Browse files
committed
Add Dockerfile
1 parent 00a3270 commit 94c7762

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM golang:latest as go-builder
2+
MAINTAINER Valentin Kuznetsov vkuznet@gmail.com
3+
4+
# build procedure
5+
ENV PROJECT=usermetadata
6+
ENV WDIR=/data
7+
WORKDIR $WDIR
8+
RUN mkdir /build
9+
RUN git clone https://github.com/CHESSComputing/$PROJECT
10+
ARG CGO_ENABLED=0
11+
RUN cd $PROJECT && make && cp srv /build && cp -r static /build
12+
13+
# build final image for given image
14+
FROM alpine as final
15+
# FROM gcr.io/distroless/static as final
16+
RUN mkdir -p /data
17+
COPY --from=go-builder /build/srv /data
18+
COPY --from=go-builder /build/static /data/static
19+
LABEL org.opencontainers.image.description="FOXDEN usermetadata service"
20+
LABEL org.opencontainers.image.source=https://github.com/chesscomputing/usermetadata
21+
LABEL org.opencontainers.image.licenses=MIT
22+
WORKDIR /data

0 commit comments

Comments
 (0)