Files
skills-publish-packages/.github/steps/5-run-your-image.md
T
2023-11-16 13:14:44 -08:00

27 lines
1.1 KiB
Markdown

<!--
<<< Author notes: Step 5 >>>
Start this step by acknowledging the previous step.
Define terms and link to docs.github.com.
-->
## Step 5: Run your image
_Nicely done grabbing your Docker image! :relaxed:_
Let's trying running it.
### :keyboard: Activity: Run your image
1. Find your image information by typing `docker image ls`.
![screenshot of output from Docker image ls command: lists docker images, REPOSITORY TAG and docker URL](https://i.imgur.com/UAwRXiq.png)<!-- This screenshot should be changed. -->
1. Use the following command to run a container from your image:
```bash
docker run -dp 8080:80 --rm <YOUR_IMAGE_NAME:TAG>
```
1. Replace `YOUR_IMAGE_NAME` with your image name under the `REPOSITORY` column.
1. Replace `TAG` with the image tag under the `TAG` column.
1. Press **Enter**.
1. If everything went well, you will see hash value as output on your screen.
1. Optionally, you can open [localhost:8080](http://localhost:8080) to see the page you just created.
1. _We can't automatically verify this step for you, so please continue on to the next step below!_