Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run the devcontainer in VC Code on your own PC #6

Open
lakruzz opened this issue Mar 2, 2024 · 0 comments
Open

Run the devcontainer in VC Code on your own PC #6

lakruzz opened this issue Mar 2, 2024 · 0 comments
Labels
template Template item

Comments

@lakruzz
Copy link
Contributor

lakruzz commented Mar 2, 2024

Now the repo has a .devcontainer configuration. Which means that it can run on any VC Code IDE - including a handfuld of others that als support devcontainers.

Note

☝️ Learning goals in this issue

  • Install Docker on you PC
  • Clone the repo to your own PC
  • Start the devcontainer as a locally hosted Docker container 🤞
  • Create the codepace, run it in the cloud and connect to it from VS Code on your PC 💪

If you haven't installed VS Code and Docker Desktop already...

Do it now

🏋️‍♀️ Exercise

  • 👉 Install Docker Desktop👈
  • 👉 Test that Docker is working docker run hello-world👈
  • 👉 Install VS Code👈

Clone the repo to your PC and open it in VS Code. VS Code will recognize that you have a .devcontainer file in your project and offer you to open your container locally using Docker.

image

Choose "Reopen in container"

Try to open you Docker Desktop app. You'll see that the container is running locally on your PC. When you run bundle exec jekyll serve from the /docs folder you'll see that the site is also hosted from your local machine on `127.0.0.1:4000``

Close VC Code and stop the container. Try this alternative:

Browse to the repository on GitHub and under code, browse to the CodeSpace, right click on it and chose Open In VS Code.

You can achieve the same thing from opening VS Code and from the Command Palette chose "CodeSpaces: Connect to code space" chose your CodeSpace from the list.

@lakruzz lakruzz changed the title add a static web page Add a static web page Mar 3, 2024
@lakruzz lakruzz added the template Template item label Mar 3, 2024
@lakruzz lakruzz changed the title Add a static web page Run the devcontainer in VC Code on your own PC Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
template Template item
Projects
None yet
Development

No branches or pull requests

1 participant