This container deploys a stand-alone To Do application written in AngularJS.
The web server supports both HTTP and HTTPs connection.
Run the following command to build the container image:$ podman build -t do280/todo-angular:latest .
The current application provides a self-signed certificate in ssl
. Their names
would match the certificates name in OpenShift.
If you need to regenerate a self-signed certificate,run the following command:$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt
If you need to recreate a Diffie-Hellman group, run the following command:$ openssl dhparam -out dhparam.pem 2048
podman run --userns keep-id \
-v ./ssl/certs:/usr/local/etc/ssl/certs:Z \
--name todo -p 8080:8080 \
do280/todo-angular:latest`
podman run --userns keep-id \
-v ./ssl/certs:/usr/local/etc/ssl/certs:Z \
--name todo -p 8443:8443 \
do280/todo-angular:latest`
Notice the port range:
podman run --userns keep-id \
-v ./ssl/certs:/usr/local/etc/ssl/certs:Z \
--name test \
-p 8080-8443:8080-8443 \
do280/todo-angular:latest
If you need to disable HTTPs support, run the following steps:
Dockerfile
-- comment lines 16 and 17: # COPY nginx/dhparam.pem /etc/ssl/conf/dhparam.pem # COPY nginx/conf.d/ssl.conf /etc/nginx/conf.d/ssl.conf
nginx/nginx.conf
comment line 38 & 66-67: # include /etc/nginx/conf.d/*.conf; ... # error_page 497 https://$host:8443$request_uri; # return 301 https://$host:8443$request_uri;
`$ podman build -t do280/todo-angular:latest .`
`$ podman run --name todo -p 8080:8080 do280/todo-angular:latest`