Project aims to containerize a simple front-end applicaton(vuejs) with building an image using a Dockerfile
#pull node image
FROM node
#set container working directory to /app
WORKDIR /app
#copy all files(application code) in context file
COPY . .
#install dependencies in package.json file
RUN npm install
#run script "serve" in package.json file
CMD ["npm", "run", "serve"]
#expose container's port
EXPOSE 8080
git clone https://github.com/LEGO221/Vue-Docker-App.git
docker build -t <new imagetag> .
make sure you're in working directory of Dockerfile
docker container run -it -p 8080:8080 <image tag>
From webrowser search for http://localhost:8080