Refactor Dockerfile to streamline build process and set timezone
This commit is contained in:
parent
1e2a22be68
commit
f6f9cadb50
1 changed files with 3 additions and 14 deletions
17
Dockerfile
17
Dockerfile
|
|
@ -1,6 +1,8 @@
|
||||||
FROM oven/bun:alpine as build
|
FROM oven/bun:alpine as build
|
||||||
|
|
||||||
RUN apk add --no-cache tzdata git
|
RUN apk add --no-cache tzdata git
|
||||||
|
ENV TZ=Asia/Seoul
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
@ -14,18 +16,5 @@ RUN bun install --frozen-lockfile
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN bun run ./cli/git-commit-build.ts
|
RUN bun run ./cli/git-commit-build.ts
|
||||||
RUN bun run build
|
|
||||||
|
|
||||||
FROM alpine:latest as runtime
|
CMD ["bun", "run", "start"]
|
||||||
|
|
||||||
RUN apk add --no-cache tzdata libstdc++ libgcc
|
|
||||||
|
|
||||||
ENV TZ=Asia/Seoul
|
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY --from=build /app/memos-rss .
|
|
||||||
COPY --from=build /app/version .
|
|
||||||
|
|
||||||
CMD ["./memos-rss"]
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue