+
Skip to content

Conversation

github-learning-lab[bot]
Copy link
Contributor

Creating a Dockerfile 🐳

You may have noticed that your workflow didn't run as expected. That's because we don't have a Dockerfile in our repository yet!

We will add a Dockerfile in this pull request. I'll leave a comment with instructions to help you. 😄

@github-learning-lab
Copy link
Contributor Author

Dockerfile 🐳

The Dockerfile contains a set of instructions that get stored in a Docker Image.

We will use a very simple Dockerfile. If you'd like, you can learn more about Dockerfiles.

Step 3: Add a Dockerfile image

⌨️ Activity: Edit the Dockerfile to include the proper image

  1. Edit the Dockerfile located on the add-dockerfile branch in the root of the repository
  2. Paste the following contents inside of the Docker file:
FROM nginx:1.17
COPY . /usr/share/nginx/html
  1. Commit your changes to the add-dockerfile branch

@github-learning-lab github-learning-lab bot mentioned this pull request Aug 13, 2021
@github-learning-lab
Copy link
Contributor Author

Now things are running!

Whoa, now things are running! This may take a few minutes.

After committing the Dockerfile, the repository had the components it needed to start the CD workflow.

This might take a tiny amount of time, so grab your popcorn 🍿 and wait. I'll respond one your pipeline has finished running, until then... sit tight!

You can click the Actions tab to view your workflow in progress. Make sure you come back to this pull request.

@github-learning-lab
Copy link
Contributor Author

Oh oh...

Something went wrong in your workflow.

Navigate to the Actions tab to troubleshoot. Recommit the necessary fixes to this repository.

@github-learning-lab
Copy link
Contributor Author

You did it!

It looks like your workflow run was successful. Awesome!

You now have a Docker image stored in the GitHub Packages.

screenshot of repository navigation highlighting the "1 package" button

You may need to switch to the main branch to see your package count increase.

screenshot of the packages built as seen at the top of the code tab

You should now see a package named tic-tac-toe. 🎉


I'll go ahead and merge this pull request. I'll give you the next steps in the next issue.

@github-learning-lab github-learning-lab bot merged commit 9e59edc into main Aug 13, 2021
@github-learning-lab github-learning-lab bot deleted the add-dockerfile branch August 13, 2021 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载