4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

docker上のVue.jsのvue uiを使う

Posted at

docker上にVue.jsのコンテナを立てたけど、vue ui を使いたくなった。
デフォだとlocalhostかつ8000で立ち上がる。

オプションを指定するだけ

非常に簡単
vue uiの後にいろいろオプションを足せる

/usr/src/app$ vue ui -h       
  
Usage: ui [options]

start and open the vue-cli ui

Options:
  -H, --host <host>  Host used for the UI server (default: localhost)
  -p, --port <port>  Port used for the UI server (by default search for available port)
  -D, --dev          Run in dev mode
  --quiet            Don't output starting messages
  --headless         Don't open browser on start and output port
  -h, --help         output usage information 

ひとまず8080はdev用にのportとして置いていて、一応このデフォポートを使えるように8000もdocker-comose.ymlの時点で繋げた。

localhostだとdockerの外から見にいけないので、hostを 0.0.0.0 にして起動する。

$ vue ui -H 0.0.0.0
🚀  Starting GUI...
🌠  Ready on http://0.0.0.0:8000

これでhttp://localhost:8000/を見に行くと表示されている。

-P, —port でportを8080のすればそれでもいける。
以上、備忘録。

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?