fantos commited on
Commit
3ce5705
·
verified ·
1 Parent(s): f4e6cd4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -7
Dockerfile CHANGED
@@ -1,5 +1,4 @@
1
  # syntax=docker/dockerfile:1.4
2
-
3
  FROM oven/bun:1 AS base
4
 
5
  # Install dependencies only when needed
@@ -26,13 +25,14 @@ RUN bun run build
26
  FROM base AS runner
27
  WORKDIR /app
28
 
29
- ENV NODE_ENV production
 
30
  # Uncomment the following line in case you want to disable telemetry during runtime.
31
  # ENV NEXT_TELEMETRY_DISABLED 1
32
 
33
- RUN \
34
- addgroup --system --gid 1001 nodejs; \
35
- adduser --system --uid 1001 nextjs
36
 
37
  COPY --from=builder --link /app/public ./public
38
 
@@ -44,6 +44,7 @@ USER nextjs
44
 
45
  EXPOSE 3000
46
 
47
- ENV PORT 3000
48
- ENV HOSTNAME 0.0.0.0
 
49
  CMD ["bun", "run", "server.js"]
 
1
  # syntax=docker/dockerfile:1.4
 
2
  FROM oven/bun:1 AS base
3
 
4
  # Install dependencies only when needed
 
25
  FROM base AS runner
26
  WORKDIR /app
27
 
28
+ ENV NODE_ENV=production
29
+
30
  # Uncomment the following line in case you want to disable telemetry during runtime.
31
  # ENV NEXT_TELEMETRY_DISABLED 1
32
 
33
+ # ✅ 수정: groupadd/useradd 사용 (oven/bun은 Debian slim 기반)
34
+ RUN groupadd --system --gid 1001 nodejs && \
35
+ useradd --system --uid 1001 --gid nodejs --no-create-home nextjs
36
 
37
  COPY --from=builder --link /app/public ./public
38
 
 
44
 
45
  EXPOSE 3000
46
 
47
+ ENV PORT=3000
48
+ ENV HOSTNAME=0.0.0.0
49
+
50
  CMD ["bun", "run", "server.js"]