Announcements
- Term Project
1. Intro to course and Input Validation |
6. |
2. Repositories and Unit Testing |
7. Creating a Web Service |
3. Claims and Third Party Authentication |
8. Consuming a Web Service |
4. Web Security |
9. Docker Containers |
5. Publishing to a Production Server | 10. Term Project |
This week you will learn how to...
# download the ASP.NET Core runtime
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
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.
WORKDIR app/
# 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.