How to run vue app inside docker on different port


By default vue app runs over port 8080. You can change the port to 8081 or some thing else inside docker by following steps below

  1. Open port 8081 for docker in docker-compose
  2. Run npm serve on port 8081
  3. In vue.config.js, change port to 8081
docker-compose.yml

vue-config.js
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s