⚠️ Deprecated ⚠️
This template is no longer maintained. I haven't used this template personally for a long time and decided to focus on maintaining my two primarily used templates. Please consider choosing one of these for your project:
Build Instructions
- Install C# dependencies with command
dotnet restore
in the root directory. - Install client dependencies with command
yarn
in the client directory. - Running the application can be done with the
F5
.vscode/launch.json
command.
Building With Docker
- Build the
Dockerfile
with the below command in the root directory.
docker image build -t {image_name} .
- To see all the images run the command
docker images
- Run the container with the command
docker container run --publish 8888:80 --detach --name {container_name} {image_name}
--publish asks Docker to forward traffic incoming on the host’s port 8888, to the container’s port 80 (containers have their own private set of ports, so if we want to reach one from the network, we have to forward traffic to it in this way; otherwise, firewall rules will prevent all network traffic from reaching your container, as a default security posture).
--detach asks Docker to run this container in the background.
Docker Clean Up
Remove Images/Repositories
- List images with command
docker images
- Remove repository by name
docker rmi {image_name}
Remove Container
Remove by container name
docker container rm --force {container_name}
Remove by container id
- List container ids
docker container ls -a
- Remove the container with the id
docker container rm --force {container_id}
Remove Others
- This command will remove all stopped containers, all dangling images, and all unused networks
docker system prune