Using Docker Containers
- Term Project
This week you will learn how to...
# download the ASP.NET Core runtime
docker build -t yourwebappname .
# Copy files from the dev machine to the container.
COPY GoodBookNook/bin/Release/netcoreapp3.1/publish/ app/
# Change directories, we need to run the app from the app directory.
# Start the web app when the container runs.
ENTRYPOINT ["dotnet", "GoodBookNook.dll", "--environment=Production"]
docker run --rm -p 5001:8080 yourwebappnameNotes:
You can connect a terminal to your container in order to see
what's going on inside.
cd c/Users/Student/Documents/GitHub/CS296N-BookInfo-Core-2/BookInfoBe sure to use forward slashes.
SECURITY WARNING: You are building a dows Docker host. All files and dire wxr-xr-x' permissions. It is recomme or sensitive files and directories.This is because the files you copied from Windows to the Linux VM have permissions that are considered a security risk. You should change the permissions to improve security, but the image will still work even if you don't.