File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 1
1
FROM node:22-alpine AS base
2
2
3
+
4
+ ARG USER=node
5
+ ENV HOME /home/$USER
6
+
3
7
# Alpine doesn't have curl, so add it
4
8
RUN apk --no-cache add curl
5
9
6
- ARG USER=si-user
7
- ENV HOME /home/$USER
8
- RUN adduser -D $USER \
9
- && mkdir -p /etc/sudoers.d \
10
- && echo "$USER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER \
11
- && chmod 0440 /etc/sudoers.d/$USER
12
-
13
10
# Set the working directory inside the container
14
11
USER $USER
15
12
WORKDIR $HOME/app
16
13
17
14
# Copy the package.json and lock file to install dependencies
18
- COPY package.json package-lock.json panda.config.ts ./
15
+ COPY --chown=$USER:$USER package.json package-lock.json panda.config.ts ./
19
16
20
17
# Install dependencies
21
18
RUN npm install
22
19
23
20
# Copy the rest of the application files
24
- COPY . .
21
+ COPY --chown=$USER:$USER . .
25
22
26
23
# Build the Next.js app
27
24
RUN npm run build
You can’t perform that action at this time.
0 commit comments