From f91136f166b742c67d6f60303a707d6bbff0d4a5 Mon Sep 17 00:00:00 2001 From: Chaitanya Date: Sat, 29 Jul 2023 13:39:25 +0530 Subject: [PATCH] Add build command to docker --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8f63d7cd..57424bc5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -# Node version matching the version declared in the package.json +# Node version matching the version declared in the package.json FROM node:16-slim # Update O.S. -RUN apt-get update && apt-get upgrade -y +RUN apt-get update && apt-get upgrade -y # Install required O.S. packages RUN apt-get install -y git python make g++ @@ -25,8 +25,11 @@ RUN yarn # Bundle app source COPY --chown=node:node . . -# Set the container port +# Set the container port EXPOSE 8080 +# Build the app +RUN yarn run build + # Start the aplication CMD ["yarn", "run", "start" ]