Sign inSign up

jimkku/app-web

By jimkku

Updated about 1 year ago

Quickly launch frontend projects like HTML/Vue

Image
Web servers
0

349

jimkku/app-web repository overview

How To Use

  1. Create A Directory
  2. Create nginx.conf And mime.types File And Upload dist or index.html Into The Directory
  3. Start The Container And Use -v to Mount The Directory into /app

For Example 1

docker run -it --name container-name --restart always -p 80:80 -v /path/to/directory:/app -d jimkku/app-web

PS: You should tell the root path of index.html(like /app or /app/dist) in the nginx.conf.

For Example 2

I have created a directory named /home/jimkku/example,and then I upload the dist folder and create the nginx.conf and mime.types file in the directory,then I have to tell the root path in the nginx.conf,just like:

http {
    include       mime.types;

    keepalive_timeout  65;

    server {
        listen       80;
        server_name  example;

        location / {
            root   /app/dist/;
            index  index.html index.htm;
        }
    }

}

OK,the Pre-work has been finished, what I need to do more is run the following cmd:

docker run -it --name example-app --restart always -p 80:80 -v /home/jimkku/example:/app -d jimkku/app-web

Tag summary

Content type

Image

Digest

sha256:2b8d6e1e6

Size

9.7 MB

Last updated

about 1 year ago

docker pull jimkku/app-web