MusicAPI
.NET commands
initialize project:
dotnet new webapi -lang F# -o MusicAPI
run project locally:
dotnet run
Deployment
Publish project:
dotnet publish -c Release -o publish
Build the container:
docker build -t music_api:latest .
Export image to a file:
-
docker save music_api:latest -o MusicAPI.tar -
Transer the file to USB, then run commands on the server.
Load devices:
lsblk
Usually it is sdb1, mount it to a created mount point.
sudo mount /dev/sdb1 /mnt/usbcp /mnt/usb/MusicAPI.tar ~/sudo umount /mnt/usb
Load image on server:
docker load -i MusicAPI.tar
Run container on server:
docker run -d -p 8080:80 --name MusicAPI music_api:latest
Description
Languages
F#
93.1%
Dockerfile
6.9%