mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
build: update dockerfile (#82)
This commit is contained in:
parent
dbf7ce0deb
commit
ff33bcb99a
2 changed files with 13 additions and 9 deletions
13
Dockerfile
13
Dockerfile
|
@ -7,7 +7,9 @@ COPY web .
|
|||
RUN yarn build
|
||||
|
||||
# build app
|
||||
FROM golang:1.16 AS app-builder
|
||||
FROM golang:1.17.6-alpine AS app-builder
|
||||
|
||||
RUN apk add --no-cache git make build-base
|
||||
|
||||
ENV SERVICE=autobrr
|
||||
|
||||
|
@ -21,12 +23,11 @@ COPY . ./
|
|||
COPY --from=web-builder /web/build ./web/build
|
||||
COPY --from=web-builder /web/build.go ./web
|
||||
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GOOS=linux
|
||||
ENV CGO_ENABLED=1
|
||||
|
||||
#RUN make -f Makefile build/app
|
||||
RUN go build -o bin/${SERVICE} ./cmd/${SERVICE}/main.go
|
||||
RUN go build -o bin/autobrrctl ./cmd/autobrrctl/main.go
|
||||
RUN make -f Makefile build/app
|
||||
RUN make -f Makefile build/ctl
|
||||
|
||||
# build runner
|
||||
FROM alpine:latest
|
||||
|
@ -44,5 +45,5 @@ VOLUME /config
|
|||
COPY --from=app-builder /src/bin/autobrr /usr/local/bin/
|
||||
COPY --from=app-builder /src/bin/autobrrctl /usr/local/bin/
|
||||
|
||||
ENTRYPOINT ["autobrr", "--config", "/config"]
|
||||
ENTRYPOINT ["/usr/local/bin/autobrr", "--config", "/config"]
|
||||
#CMD ["--config", "/config"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue