SessionZeroWasm/README.docker.md
2025-07-01 23:23:12 -05:00

1.5 KiB

SessionZero Docker Deployment Guide

This guide explains how to build and deploy the SessionZero Blazor WebAssembly PWA using Docker.

Prerequisites

  • Docker installed on your machine
  • Docker Compose installed on your machine (optional, but recommended)
  1. Navigate to the project root directory (where the docker-compose.yml file is located)

  2. Run the following command to build and start the container:

    docker-compose up -d --build
    
  3. Access the application at http://localhost:8080

Building and Running with Docker CLI

  1. Navigate to the project root directory (where the Dockerfile is located)

  2. Build the Docker image:

    docker build -t sessionzero .
    
  3. Run the container:

    docker run -d -p 8080:80 --name sessionzero-app sessionzero
    
  4. Access the application at http://localhost:8080

Stopping the Container

With Docker Compose

docker-compose down

With Docker CLI

docker stop sessionzero-app
docker rm sessionzero-app

Troubleshooting

  • If you encounter any issues with the container not starting, check the logs:

    docker logs sessionzero-app
    
  • Make sure ports 8080 is not being used by another application on your host machine.

  • If the application doesn't work as expected, verify that all files were copied correctly by inspecting the container:

    docker exec -it sessionzero-app sh
    ls -la /usr/share/nginx/html