https://github.com/astechedu/sample-dockerized-vue-app
This is sample dockerized vue app.
https://github.com/astechedu/sample-dockerized-vue-app
docker docker-image docker-vue dockerfile javascript vue vuejs3
Last synced: 2 months ago
JSON representation
This is sample dockerized vue app.
- Host: GitHub
- URL: https://github.com/astechedu/sample-dockerized-vue-app
- Owner: astechedu
- Created: 2022-12-29T15:48:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-30T12:49:59.000Z (over 3 years ago)
- Last Synced: 2025-06-25T03:41:02.010Z (12 months ago)
- Topics: docker, docker-image, docker-vue, dockerfile, javascript, vue, vuejs3
- Language: Dockerfile
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dockerized Vue App
Dockerfile:
#Fetching the latest node image on alpine linux
FROM node:18-alpine
#install simple http server for serving static content
RUN npm install -g http-server
#make the 'app' folder the current working directory
WORKDIR /app
#copy 'package.json' to install dependencies
COPY package*.json ./
#install dependencies
RUN npm install
#copy files and folders to the current working directory (i.e. 'app' folder)
COPY . .
#build app for production with minification
RUN npm run build
EXPOSE 8080
CMD [ "http-server", "dist" ]
----- X -----
#Building image
docker build . -t dockerized_vue
#Running container
docker run --name vue-app -p 8080:8080 -d dockerized_vue
#On Browser
http://localhost:8080
# Vue
This template should help get you started developing with Vue 3 in Vite.
## Recommended IDE Setup
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
## Customize configuration
See [Vite Configuration Reference](https://vitejs.dev/config/).
## Project Setup
```sh
npm install
```
### Compile and Hot-Reload for Development
```sh
npm run dev
```
### Compile and Minify for Production
```sh
npm run build
```