0% found this document useful (0 votes)
33 views1 page

PowerShell Cheat Sheet PDF

Uploaded by

demy2014
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views1 page

PowerShell Cheat Sheet PDF

Uploaded by

demy2014
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

DOKERFILE Example:

# the next line sets the base image for this image
# the base image is also based on a Dockerfile
# see:
https://hub.docker.com/layers/library/node/18-alpine/images/sha256-
a0b787b0d53feacfa6d606fb555e0dbfebab30573277f1fe25148b05b66fa097
# node provides official images for Node.js and
# alpine: a lightweight Linux distribution to reduce image size
FROM node:18-alpine

# sets the working directory inside the image


# all commands after this instruction will be
# executed inside this directory
WORKDIR /app

# copies the package.json and package-lock.json


# from the client (e.g., your server or your development machine)
# into the /app directory inside the image
# before running npm ci to
# get the advantage of layer caching
COPY ./package* .

# installs all node.js dependencies


# npm ci is similar to npm install but intended to be
# used in continuous integration (CI) environments
# it will do a clean installion based on the package-lock.json
RUN npm ci

# copies the source code into the image


COPY . .

# this runs the build command specified in the package.json


RUN npm run build:server

# the EXPOSE instruction does not actually expose the port 300 of
this image
# this is documentation so that we know which port we need to expose
# we do this when starting the container with the --publish flag
EXPOSE 3000

# executes the server.js file that is located in the build directory


CMD ["node", "./build/index.js"]

You might also like