forked from bleenco/abstruse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.worker
33 lines (22 loc) · 937 Bytes
/
Dockerfile.worker
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
30
31
32
33
# stage 1 build
FROM golang:1.16-alpine as build
ARG GIT_COMMIT=""
ENV GIT_COMMIT=$GIT_COMMIT
WORKDIR /app
RUN apk --no-cache add git make protobuf protobuf-dev ca-certificates alpine-sdk
COPY . /app/
RUN go get github.com/jkuri/statik github.com/golang/protobuf/protoc-gen-go github.com/google/wire/...
RUN make protoc && make wire && make worker
# stage 2 image
FROM alpine:latest
LABEL maintainer="Jan Kuri <[email protected]>" \
org.label-schema.schema-version="1.0" \
org.label-schema.name="abstruse-worker" \
org.label-schema.description="Distributed Continuous Intergration Platform" \
org.label-schema.url="https://ci.abstruse.cc/" \
org.label-schema.vcs-url="https://github.com/bleenco/abstruse" \
org.label-schema.vendor="abstruse"
COPY --from=build /etc/ssl/certs /etc/ssl/certs
COPY --from=build /app/build/abstruse-worker /usr/bin/abstruse-worker
ENTRYPOINT [ "/usr/bin/abstruse-worker" ]
EXPOSE 3330