add Dockerfile
This commit is contained in:
1 parent
edaa7af149
commit
6d37f118ef
1 file changed
+34
+34
@@ -0,0 +1,34 @@
|
||||
FROM public.ecr.aws/docker/library/node:24-slim AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . /app
|
||||
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
# 빌드 결과 확인 (디버깅용)
|
||||
# RUN ls -la /app
|
||||
|
||||
# 타임존 설정
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime && \
|
||||
echo "Asia/Seoul" > /etc/timezone && \
|
||||
date
|
||||
|
||||
FROM gcr.io/distroless/nodejs24-debian12
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /etc/localtime /etc/localtime
|
||||
COPY --from=builder /etc/timezone /etc/timezone
|
||||
COPY --from=builder /app ./
|
||||
# COPY --from=builder /app/amazon_ecs/healthcheck.js /
|
||||
|
||||
# ENV NODE_ENV=<BRANCH_NAME>
|
||||
|
||||
# EXPOSE 3000
|
||||
|
||||
# 애플리케이션 시작
|
||||
CMD ["./dist/main.js"]
|
||||
Reference in new issue
Block a user