diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..270d2cb --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,20 @@ +name: dockerimage build +on: + push: + branches: + dev +jobs: + builds: + runs-on: ubuntu:latest + steps: + - name: checkout code + uses: actions/checkout@v4.2.2 + - name : docker image build + run | + docker build -t imagesname . + echo " Docker images has been created " + + + + + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8dff666 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM node:22-alpine3.18 +WORKDIR /app +COPY package.json . +RUN npm install +COPY . . +RUN npm run build +EXPOSE 3000 +CMD [ "npm", "start" ]