public/modules
.public/index.html
has the proper css and js import statementsmodules/main.css
/styled
appended to the import source. (This is part of the SMUI "Advanced Styling Method")import Button from '@smui/button/styled';
versus @smui/button
Dockerfile
runs a multistage build:npm run bulid
(public
folder) into a minimal linux distro to run the nginx web server.nginx-spa.conf
, configured for an SPA, is copied into the container. You should review and refine this file to suit your needs.docker build -t johnknapp/spa-template .
Change the tag name as needed.docker run --rm -p80:8080 johnknapp/spa-template
. (The --rm flag removes the container upon exit.)docker help
docker image ls
docker image prune
docker ps -a
docker exec -it <cid> /bin/sh
(container id)docker container logs -f <cid>
docker container prune