Giter Site home page Giter Site logo

Comments (4)

github-learning-lab avatar github-learning-lab commented on May 18, 2024

Step 4: Log in to Docker

⌨️ Activity: Log in to Docker

  1. Open your terminal (Bash or Git Bash recommended)
  2. Use the following command to log in:
    docker login docker.pkg.github.com -u USERNAME -p TOKEN
    
  3. Replace USERNAME with your GitHub username
  4. Replace TOKEN with the Personal Access Token you just created
  5. Press Enter

If everything went well, 🤞 you should see Login Succeeded in your terminal.

from github-actions-for-packages.

github-learning-lab avatar github-learning-lab commented on May 18, 2024

Step 5: Pull your image

⌨️ Pull the image from GitHub Packages to your local environment

  1. Copy and paste the pull command from the package instructions into your terminal. It should look something like this:
  • docker pull docker.pkg.github.com/ayushgoswamiabr/js-build/tic-tac-toe:f29
    screenshot of the pull command on the GitHub package page
  1. Press Enter

You should see output indicating that the pull was successful, like Status: Downloaded newer image for docker.

screenshot of successful Docker image output

from github-actions-for-packages.

github-learning-lab avatar github-learning-lab commented on May 18, 2024

Step 6: Run your Docker Image

⌨️ Activity: Run your image locally

  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
  2. Use the following command to run a container from your image:
    docker run -d -it --rm -p 8080:80 --name ttt <YOUR_IMAGE_NAME:TAG>
  3. Replace YOUR_IMAGE_NAME with your image name under the REPOSITORY column
  4. Replace TAG with the image tag under the TAG column
    example of running the docker command listed above
  5. Press Enter

If everything went well, you will see hash value as output on your screen.

from github-actions-for-packages.

github-learning-lab avatar github-learning-lab commented on May 18, 2024

Congratulations! 🎉

Congratulations @ayushgoswamiabr, you did it! You wrote a workflow that sends a code through a CI/CD pipeline and leaves you will a fully tested, fully deployable artifact.

You did so using GitHub Actions and GitHub Packages!

This concludes our course. Close this issue when you are done. You are free to keep this repository for future reference as you go out and build cool things on the internet!

celebrate

What's next?

We hope this course helped you feel more comfortable using GitHub. Remember: You’re always welcome to repeat course topics if you’d like additional practice. If you’re ready to build on your new skills, here are some ideas.

Contribute to a project

To find projects to contribute to through trending topics and curated collections, check out GitHub Explore.

Keep learning

What will you learn next?

from github-actions-for-packages.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.