Skip to content

Commit 2c7b511

Browse files
committed
Revert "update docker-image"
This reverts commit 95dd827.
1 parent a754c97 commit 2c7b511

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

Dockerfile

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1-
FROM node:18-alpine
1+
# Stage 1: Building the code
2+
FROM node:20 as builder
23

3-
COPY . /app
4-
5-
# Set the working directory
64
WORKDIR /app
75

8-
# Install pnpm
9-
RUN npm install -g pnpm
6+
# Copy package.json and package-lock.json (if available)
7+
COPY package*.json ./
8+
COPY pnpm*.yaml ./
9+
10+
# Install pre-install deps
11+
RUN npm install --global pnpm
12+
RUN pnpm install
13+
14+
# Copy the code
15+
COPY . /app
1016

11-
# By default, use the enterprise theme
12-
ARG THEME=enterprise
17+
# Set our env vars needed for building it for /blog
18+
ENV NEXT_PUBLIC_BASE_URL='/blog'
19+
ENV NEXT_PUBLIC_MODE='production'
1320

14-
WORKDIR /app/packages/blog-starter-kit/themes/${THEME}
15-
RUN cp .env.example .env.local
16-
RUN pnpm install --frozen-lockfile
21+
RUN cd packages/blog-starter-kit/themes/enterprise && \
22+
pnpm install
1723

18-
RUN pnpm build
24+
RUN cd packages/blog-starter-kit/themes/enterprise && \
25+
pnpm run build
1926

20-
# Expose the port Next.js runs on
2127
EXPOSE 3000
2228

23-
# Run the Next.js start script
24-
CMD ["pnpm", "start"]
29+
ENTRYPOINT ["/bin/sh", "-c", "cd /app/packages/blog-starter-kit/themes/enterprise && /usr/local/bin/pnpm run start" ]
30+
# # RUN pnpm dev

0 commit comments

Comments
 (0)