mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
build(docker): improve cache on web-builder stage (#1034)
* upgrade pnpm * add postcss-import npm dependency * fix postcss.config.js lint * improve cache for Docker web-builder stage
This commit is contained in:
parent
f234caec08
commit
0d7cbdfe50
4 changed files with 22 additions and 16 deletions
16
Dockerfile
16
Dockerfile
|
@ -1,10 +1,14 @@
|
|||
# build web
|
||||
FROM node:18.17.0-alpine3.18 AS web-builder
|
||||
COPY . ./
|
||||
RUN corepack enable
|
||||
|
||||
WORKDIR /web
|
||||
RUN corepack enable && \
|
||||
pnpm install --frozen-lockfile && \
|
||||
pnpm run build
|
||||
|
||||
COPY web/package.json web/pnpm-lock.yaml ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
COPY web ./
|
||||
RUN pnpm run build
|
||||
|
||||
# build app
|
||||
FROM golang:1.20-alpine3.18 AS app-builder
|
||||
|
@ -13,7 +17,7 @@ ARG VERSION=dev
|
|||
ARG REVISION=dev
|
||||
ARG BUILDTIME
|
||||
|
||||
RUN apk add --no-cache git make build-base tzdata
|
||||
RUN apk add --no-cache git build-base tzdata
|
||||
|
||||
ENV SERVICE=autobrr
|
||||
|
||||
|
@ -23,7 +27,6 @@ COPY go.mod go.sum ./
|
|||
RUN go mod download
|
||||
|
||||
COPY . ./
|
||||
|
||||
COPY --from=web-builder /web/dist ./web/dist
|
||||
COPY --from=web-builder /web/build.go ./web
|
||||
|
||||
|
@ -54,4 +57,3 @@ 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