Clone git repo from Dockerfile

This commit is contained in:
Mahesh Asolkar 2020-01-26 17:52:16 -08:00
parent bbee92fe53
commit 3644543ff0
2 changed files with 9 additions and 7 deletions

View File

@ -5,13 +5,10 @@ FROM node:13
WORKDIR /usr/src/app WORKDIR /usr/src/app
# Install app dependencies # Install app dependencies
COPY package*.json ./ RUN git clone https://git.heshapps.com/asolkar/mma-ask-app.git .
RUN npm install RUN npm install
# RUN NPM ci --only=production # RUN npm ci --only=production
# Bundle app source
COPY . .
EXPOSE 3000 EXPOSE 3000
CMD ["node", "ask.js"] CMD ["node", "ask.js"]

View File

@ -5,7 +5,12 @@
# Run docker container # Run docker container
% docker run --publish 49330:3000 --detach % docker run --publish 49330:3000 --detach mahesh/mma-ask-app
7e4dfed65d776e3c8cd8e5c6e970699b561bbbc6f2d63d5d75b7ee68c9672358
# Get a shell in running container
% docker exec --interactive --tty 7e4dfed65d776e3c8cd8e5c6e970699b561bbbc6f2d63d5d75b7ee68c9672358 /bin/bash
# Manage docker containers # Manage docker containers