-
Notifications
You must be signed in to change notification settings - Fork 103
/
Dockerfile.worker
41 lines (29 loc) · 1.17 KB
/
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
34
35
36
37
38
39
40
41
# stage 1 build
FROM golang:1.21-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 google.golang.org/protobuf/cmd/protoc-gen-go \
github.com/jkuri/statik \
github.com/google/wire/cmd/[email protected] \
google.golang.org/grpc/cmd/protoc-gen-go-grpc
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go \
github.com/jkuri/statik \
github.com/google/wire/... \
google.golang.org/grpc/cmd/protoc-gen-go-grpc
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.app/" \
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