forked from celer-network/im-executor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
20 lines (16 loc) · 690 Bytes
/
Dockerfile
File metadata and controls
20 lines (16 loc) · 690 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM golang:1.18-alpine as builder
RUN apk add --no-cache g++ git
# override git so go can access private repos
# ONLY use this if there is 2nd stage container, otherwise ARG is visible in image history
ARG GH_TOKEN
RUN git config --global url."https://$GH_TOKEN:@github.com/".insteadOf "https://github.com/"
WORKDIR /im-executor
ADD go.mod go.sum /im-executor/
RUN go mod download
ADD . /im-executor
RUN go build -o /im-executor/bin/executor ./cmd/main
FROM alpine:latest
VOLUME /executor/env
WORKDIR /executor/env
COPY --from=builder /im-executor/bin/executor /usr/local/bin
CMD ["/bin/sh", "-c", "executor start --test --loglevel debug --home /executor/env 2> /executor/env/app.log"]