Skip to content

Commit

Permalink
chore: adding suggestions, making it bundle prism dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
signorecello committed Jan 9, 2024
1 parent 2138c8d commit c4cfdbe
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ The easiest way to use these tools is by installing the [Noir VS Code extension]

Some Noir repos have leveraged Codespaces in order to ease the development process. You can visit the [noir-starter](https://github.com/noir-lang/noir-starter) for an example.

<video width="100%" height="auto" controls>
<source src={require('@site/static/video/codespaces_showcase.mp4').default} type="video/mp4" />
Your browser does not support the video tag.
</video>

## GitHub Actions

You can use `noirup` with GitHub Actions for CI/CD and automated testing. It is as simple as
Expand Down
22 changes: 13 additions & 9 deletions docs/docs/how_to/using-devcontainers.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: Devcontainers and Codespaces
title: Developer Containers and Codespaces
description: "Learn how to set up a devcontainer in your GitHub repository for a seamless coding experience with Codespaces. Follow our easy 8-step guide to create your own Noir environment without installing Nargo locally."
keywords: ["Devcontainer", "Codespaces", "GitHub", "Noir Environment", "Docker Image", "Development Environment", "Remote Coding", "GitHub Codespaces", "Noir Programming", "Nargo", "VSCode Extensions", "Noirup"]
sidebar_position: 1
---

Noir has extensive tooling. Thanks to Noirup, adding a devcontainer to your own repository is quite easy and pretty powerful.
Adding a developer container configuration file to your Noir project is one of the easiest way to unlock coding in browser.

## What's a devcontainer after all?

A devcontainer is a Docker image that comes preloaded with tools, extensions, and other tools you need to quickly get started or continue a project, without having to install Nargo locally. Think of it as a development environment in a box.
A [Developer Container](https://containers.dev/) (devcontainer for short) is a Docker image that comes preloaded with tools, extensions, and other tools you need to quickly get started or continue a project, without having to install Nargo locally. Think of it as a development environment in a box.

There are many advantages to this:

Expand Down Expand Up @@ -47,6 +47,11 @@ It is!

Github comes with a default codespace and you can use it to code your own devcontainer. That's exactly what we will be doing in this guide.

<video width="100%" height="auto" controls>
<source src={require('@site/static/video/how-tos/devcontainer.mp4').default} type="video/mp4" />
Your browser does not support the video tag.
</video>

8 simple steps:

#### 1. <a href="https://github.com/new" target="_blank">Create a new repository</a> on GitHub.
Expand Down Expand Up @@ -84,16 +89,15 @@ ENTRYPOINT ["nargo"]
```
#### 6. Commit and push your changes

#### 7. Open the command palette and run "Rebuild Codespace".
This will pull the new image and build it, so it could take a minute or so

#### 8. Done!
Just wait for the build to finish, and there's your easy Noir environment
Just wait for the build to finish, and there's your easy Noir environment.


Refer to [noir-starter](https://github.com/noir-lang/noir-starter/) as an example of how devcontainers can be used together with codespaces.


<video width="100%" height="auto" controls>
<source src={require('@site/static/video/how-tos/devcontainer.mp4').default} type="video/mp4" />
Your browser does not support the video tag.
</video>

## How do I use it?

Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default {
prism: {
theme: lightTheme,
darkTheme: darkTheme,
additionalLanguages: ['rust', 'powershell', 'solidity', 'toml', 'json', 'bash', 'dockerfile'],
additionalLanguages: ['rust', 'powershell', 'solidity', 'toml', 'json', 'bash', 'docker'],
},
stylesheets: [
{
Expand Down
Binary file added docs/static/video/codespaces_showcase.mp4
Binary file not shown.

0 comments on commit c4cfdbe

Please sign in to comment.