Skip to content

Docker Demo project - Dockerfile demo with a front-end app

Notifications You must be signed in to change notification settings

CodeGlynd/Vue-Docker-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Demo project

Project aims to containerize a simple front-end applicaton(vuejs) with building an image using a Dockerfile


Dockerfile flow

#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

Install & Run

clone project

git clone https://github.com/LEGO221/Vue-Docker-App.git

build new image with Dockerfile

docker build -t <new imagetag> .

make sure you're in working directory of Dockerfile

Create & start docker container

docker container run -it -p 8080:8080 <image tag>

From webrowser search for http://localhost:8080

About

Docker Demo project - Dockerfile demo with a front-end app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published