mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
chore(deps): update Go to 1.20 (#726)
* chore(github): Update to go 1.20 * chore(go): enable language functionality in 1.20 * build: update go versions and rename dockerfile.ci
This commit is contained in:
parent
ca196f0bf1
commit
b2d93d50c5
5 changed files with 10 additions and 8 deletions
46
ci.Dockerfile
Normal file
46
ci.Dockerfile
Normal file
|
@ -0,0 +1,46 @@
|
|||
# build app
|
||||
FROM golang:1.20-alpine3.16 AS app-builder
|
||||
|
||||
ARG VERSION=dev
|
||||
ARG REVISION=dev
|
||||
ARG BUILDTIME
|
||||
|
||||
RUN apk add --no-cache git make build-base tzdata
|
||||
|
||||
ENV SERVICE=autobrr
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . ./
|
||||
|
||||
#ENV GOOS=linux
|
||||
#ENV CGO_ENABLED=0
|
||||
|
||||
RUN go build -ldflags "-s -w -X main.version=${VERSION} -X main.commit=${REVISION} -X main.date=${BUILDTIME}" -o bin/autobrr cmd/autobrr/main.go
|
||||
RUN go build -ldflags "-s -w -X main.version=${VERSION} -X main.commit=${REVISION} -X main.date=${BUILDTIME}" -o bin/autobrrctl cmd/autobrrctl/main.go
|
||||
|
||||
# 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 curl tzdata jq
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
VOLUME /config
|
||||
|
||||
COPY --from=app-builder /src/bin/autobrr /usr/local/bin/
|
||||
COPY --from=app-builder /src/bin/autobrrctl /usr/local/bin/
|
||||
|
||||
EXPOSE 7474
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/autobrr", "--config", "/config"]
|
||||
#CMD ["--config", "/config"]
|
Loading…
Add table
Add a link
Reference in a new issue