Skip to content

Commit

Permalink
chore:
Browse files Browse the repository at this point in the history
이은상 committed Dec 26, 2024
1 parent 1d18e23 commit 23a2ac1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions 7_auth/7_1_express_js/Dockerfile
Original file line number Diff line number Diff line change
@@ -17,25 +17,25 @@ RUN npm install
# Step 6: Copy the entire application source code into the container
COPY . .

# Step 7: Build the TypeScript code
# Step 7: Set environment variables using the injected ARG values
ENV CLIENT_ID=${CLIENT_ID}
ENV CLIENT_SECRET=${CLIENT_SECRET}

# Step 8: Build the TypeScript code
RUN npm run build

# Step 8: Use a smaller production image for runtime (optional)
# Step 9: Use a smaller production image for runtime (optional)
FROM node:16-slim

# Step 9: Set the working directory in the container
# Step 10: Set the working directory in the container
WORKDIR /app

# Step 10: Copy the built files from the build stage
# Step 11: Copy the built files from the build stage
COPY --from=build /app /app

# Step 11: Install only production dependencies
# Step 12: Install only production dependencies
RUN npm install --only=production

# Step 12: Set environment variables using the injected ARG values
ENV CLIENT_ID=${CLIENT_ID}
ENV CLIENT_SECRET=${CLIENT_SECRET}

# Step 13: Expose the app port
EXPOSE 3000

0 comments on commit 23a2ac1

Please sign in to comment.