expressjs-express
SUCCESS
4m 04s
History Source
SummaryIterations1Transcript5Dockerfile
01Iteration 1
WRITEWriteFile· step #1
0s
Dockerfile379 bytes written
text19 lines · 379 chars
FROM node:18-slim

# Create app directory
WORKDIR /usr/src/app

# Install dependencies first to leverage Docker cache
COPY package.json ./

RUN npm install

# Copy the rest of the repository
COPY . .

# Expose the port the example app will listen on
EXPOSE 3000

# Run the hello-world example by default to provide a runnable server
CMD ["node", "examples/hello-world/index.js"]
WRITEWriteFile· step #2
0s
Dockerfile471 bytes written
text22 lines · 471 chars
FROM node:18-slim

# Create app directory
WORKDIR /usr/src/app

# Default to production; will install only dependencies
ENV NODE_ENV=production

# Install dependencies first to leverage Docker cache
COPY package.json ./

RUN npm install --omit=dev

# Copy the rest of the repository
COPY . .

# Expose the port the example app will listen on
EXPOSE 3000

# Run the hello-world example by default to provide a runnable server
CMD ["node", "examples/hello-world/index.js"]
WRITEWriteFile· step #3
0s
.dockerignore88 bytes written
dockerignore12 lines · 88 chars
node_modules
.git
.github
test
coverage
dist
History.md
Readme.md
README.md
*.log
*.tmp
WRITEWriteFile· step #4
0s
.dockerignore14 bytes written
dockerignore2 lines · 14 chars
.dockerignore
VERIFYVerifyBuild· step #5
1m 55s
VerifyBuildaccepted
Smoke [PASS]: test -f /usr/src/app/examples/hello-world/index.js
Smoke [PASS]: test -f /usr/src/app/package.json
Smoke [PASS]: node -v