forked from autobrr/autobrr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (34 loc) · 970 Bytes
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# build web
FROM node:16-alpine AS web-builder
WORKDIR /web
COPY web/package.json ./
RUN yarn install
COPY web .
RUN yarn build
# build app
FROM golang:1.17.6-alpine AS app-builder
RUN apk add --no-cache git make build-base
ENV SERVICE=autobrr
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
COPY --from=web-builder /web/build ./web/build
COPY --from=web-builder /web/build.go ./web
ENV GOOS=linux
ENV CGO_ENABLED=1
RUN make -f Makefile build/app
RUN make -f Makefile build/ctl
# build runner
FROM alpine:latest
LABEL org.opencontainers.image.source = "https://github.com/autobrr/autobrr"
ENV HOME="/config" \
XDG_CONFIG_HOME="/config" \
XDG_DATA_HOME="/config"
RUN apk --no-cache add ca-certificates
WORKDIR /app
VOLUME /config
COPY --from=app-builder /src/bin/autobrr /usr/local/bin/
COPY --from=app-builder /src/bin/autobrrctl /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/autobrr", "--config", "/config"]
#CMD ["--config", "/config"]