For Windows 10 User(see below for windows 7,8 user):
- Click on Docker for windows and start docker.
- Navigate to Docker on your tray and click “Switch to linux container”
- Open command prompt: Type “docker run hello-world”. You should get below message.
For Windows 7,8 user
- Click on and start the docker
- On the docker prompt: Type “docker run hello-world”. You should get below message.
- Navigate to Folder using command prompt or docker command prompt(windows 7,8 user) where you copied the linuxcoreimage.tgz and aspnetcoreimage.tgz
- Run below command to load the image to your system.
docker load < linuxcoreimage.tgz
docker load < aspnetcoreimage.tgz
- Download the .Net core/Angular project project from the github(Make sure git is installed)
- Create a file named as “DockerFile” without any extension inside the aspnetapp.
- Add content as shown below
- Open command prompt or docker command prompt(windows 7,8 user)
- Navigate to the folder in the (docker)command prompt where the dockerfile was created
docker build -t netcorewebapi .
docker run -t -p 8080:80 netcorewebapi:latest
- For windows 10: Navigate to http://localhost:8080
- For windows 7,8: Navigate to http://192.168.99.100:8080/
No comments:
Post a Comment
Note: only a member of this blog may post a comment.