|
@@ -19,13 +19,13 @@ ENV NEXT_TELEMETRY_DISABLED=1
|
|
|
|
|
|
|
|
RUN addgroup --system --gid 1001 nodejs && \
|
|
RUN addgroup --system --gid 1001 nodejs && \
|
|
|
adduser --system --uid 1001 nextjs && \
|
|
adduser --system --uid 1001 nextjs && \
|
|
|
- apk add --no-cache curl
|
|
|
|
|
|
|
+ apk add --no-cache curl su-exec
|
|
|
|
|
|
|
|
COPY --from=builder /app/public ./public
|
|
COPY --from=builder /app/public ./public
|
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|
|
|
|
|
|
|
-RUN mkdir -p /app/data && chown nextjs:nodejs /app/data
|
|
|
|
|
|
|
+RUN mkdir -p /app/data && chown -R nextjs:nodejs /app/data
|
|
|
|
|
|
|
|
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
|
|
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
|
|
|
RUN chmod +x /app/docker-entrypoint.sh
|
|
RUN chmod +x /app/docker-entrypoint.sh
|
|
@@ -37,5 +37,4 @@ ENV HOSTNAME="0.0.0.0"
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --retries=3 --start-period=30s \
|
|
HEALTHCHECK --interval=30s --timeout=5s --retries=3 --start-period=30s \
|
|
|
CMD curl -f http://localhost:3000 || exit 1
|
|
CMD curl -f http://localhost:3000 || exit 1
|
|
|
|
|
|
|
|
-USER nextjs
|
|
|
|
|
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
|
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|