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
|
||||
|
||||
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
|
||||
|
||||
|
|
@ -14,18 +16,5 @@ RUN bun install --frozen-lockfile
|
|||
COPY . .
|
||||
|
||||
RUN bun run ./cli/git-commit-build.ts
|
||||
RUN bun run build
|
||||
|
||||
FROM alpine:latest as runtime
|
||||
|
||||
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"]
|
||||
CMD ["bun", "run", "start"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue