Files
oneuptime/http-test-server/Dockerfile.dev
Nawaz Dhandala 4c94557f34 fix dockerfile
2022-01-21 21:10:14 +00:00

48 lines
928 B
Docker

#
# HTTP Test Server Dockerfile
#
# Pull base image nodejs image.
FROM node:17-alpine
# Install bash.
RUN apk update && apk add bash && apk add curl
#Use bash shell by default
SHELL ["/bin/bash", "-c"]
# Install common-server
RUN mkdir /usr/src
RUN mkdir /usr/src/common-server
WORKDIR /usr/src/common-server
COPY ./common-server/package*.json /usr/src/common-server/
RUN npm ci --only=production
COPY ./common-server /usr/src/common-server
#SET ENV Variables
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
# Install nodemon
RUN npm install nodemon -g
WORKDIR /usr/src/app
# Copy package.json files
COPY ./http-test-server/package.json /usr/src/app/package.json
COPY ./http-test-server/package-lock.json /usr/src/app/package-lock.json
# Install app dependencies
RUN npm ci
# Expose ports.
# - 3010: OneUptime-http-test-server
EXPOSE 3010
# Expose Debugger port
EXPOSE 9229
#Run the app
CMD [ "npm", "run", "dev" ]