20210811115011-docker

Docker

Make a dockerfile

FROM node:14

COPY package*.json ./
COPY tsconfig.json ./
COPY yarn.lock ./

RUN yarn install

COPY . .

RUN yarn build 

EXPOSE 3000 

CMD ["yarn", "start"]

Build

$ docker build -t NAME .

Run

$ docker run -dp 3000:3000 NAME

The package should now be available on your local machine

Last modified: 202108112346