forked from 9d8dev/next-wp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
32 lines (23 loc) · 832 Bytes
/
Dockerfile.dev
File metadata and controls
32 lines (23 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# syntax=docker.io/docker/dockerfile:1
# Use an official Node.js Alpine image
ARG NODE_VERSION=22.14.0-alpine
FROM node:${NODE_VERSION} AS base
# Set the working directory
WORKDIR /app
# Copy package related files
COPY package.json pnpm-lock.yaml ./
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
# Enable pnpm
RUN corepack enable pnpm
# Install dependencies
RUN pnpm i --frozen-lockfile
# Copy source code into the container
COPY . .
# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Following line disables telemetry.
ENV NEXT_TELEMETRY_DISABLED=1
# Expose port 3000
EXPOSE 3000
CMD ["npm", "run", "dev"]