-
-
Notifications
You must be signed in to change notification settings - Fork 4
Improve 101 intro, add devcontainer and docker basic instructions #45
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
4e70d52
Improve 101 intro, add devcontainer and docker basic instructions
froggleston 5b792f7
Add 101 docker command and Rstudio instructions
froggleston 9cda000
Initial commit of 101 setup and devcontainer instructions
froggleston 6492e93
Separate docker and devcontainer details into extras
froggleston 2671040
Move devcontainer extras to learners
froggleston f75405e
Finish initial container docs
froggleston 1550a59
tty config
froggleston 05302e2
Merge branch 'main' into frog-101-setup-1
froggleston e8d2e80
Update episodes/01-first-lesson.md
froggleston 765eac6
Update learners/devcontainer.md
froggleston 69db7e1
Update learners/devcontainer.md
froggleston 9267800
Update learners/devcontainer.md
froggleston db6ae21
Update learners/setup.md
froggleston 715f71a
Update learners/setup.md
froggleston 8d35b86
Update learners/setup.md
froggleston fc57ca3
Update learners/faq.md
froggleston 0d36a94
Update learners/setup.md
froggleston c53afa5
Update learners/devcontainer.md
froggleston 94b3704
Apply suggestions from code review
froggleston File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| --- | ||
| title: "Building Lessons" | ||
| --- | ||
|
|
||
| :::::::::::::::::::::::::::::::::::::: questions | ||
|
|
||
| - How do we build lessons using a local Workbench installation? | ||
| - How do we build lessons using the online GitHub architecture? | ||
|
|
||
| :::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
|
||
| ::::::::::::::::::::::::::::::::::::: objectives | ||
|
|
||
| - Demonstrate how to use local R and shell Workbench commands | ||
| - Demonstrate how to build and deploy lessons on GitHub | ||
|
|
||
| :::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
|
||
| ## Local Lesson Builds | ||
|
|
||
| Some stuff | ||
|
|
||
| ## GitHub Lesson Builds | ||
|
|
||
| More stuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| --- | ||
| title: 'Devcontainer Extras' | ||
| --- | ||
|
|
||
| It is good practice to use separate environments when developing software. | ||
| Many solutions exist across different programming languages and operating systems. | ||
|
|
||
| The Workbench needs additional system and R dependencies to work, and these can be time consuming to install. | ||
| As such, we provide specific separate environments using Docker which have all the required dependencies installed for you, so you can get to using the Workbench straight away on any PC or operating system that supports Docker. | ||
|
|
||
| :::::::::::::::::::::: prereq | ||
|
|
||
| You will need to have followed the [101 Quick Setup](learners/setup.md#101-docker) instructions for Docker to proceed. | ||
|
|
||
| We also presume you have installed and are using the VSCode IDE, which can be installed using the following [link](https://code.visualstudio.com/) | ||
|
|
||
| ::::::::::::::::::::::::::::: | ||
|
|
||
| ## Using a lesson's devcontainer | ||
|
|
||
| The first thing to check is that a lesson supports devcontainers. | ||
|
|
||
| ::::::::::::::::::::::: callout | ||
|
|
||
| ### Which lessons support devcontainers? | ||
|
|
||
| Any lesson that has: | ||
|
|
||
| - A `.devcontainer` folder in the root of its repository | ||
| - and a `Dockerfile` and `devcontainer.json` inside that folder | ||
|
|
||
| can be run inside a devcontainer. | ||
|
|
||
| An example can be seen in [this repository](https://github.com/carpentries/workbench-docs/tree/main/.devcontainer). | ||
|
|
||
| The base workbench templates ([md](https://github.com/carpentries/workbench-template-md/tree/main/.devcontainer) and [rmd](https://github.com/carpentries/workbench-template-rmd/tree/main/.devcontainer)) both specify a `.devcontainer` environment, so new lessons using this template will be able to immediately use devcontainers! | ||
|
|
||
| ::::::::::::::::::::::::::::::: | ||
|
|
||
| Once a lesson has a `.devcontainer` folder, Dockerfile and JSON specification, an IDE like VSCode can be used to setup and run that devcontainer to host your lesson within that IDE. | ||
| This makes it quick and easy to start developing and building a lesson without needing to install any system or R packages or dependencies. | ||
|
|
||
| ## Running the Workbench | ||
|
|
||
| ### Updating the Workbench | ||
|
|
||
| By default, the devcontainer environment will use the `latest` version of the `carpentries-workbench` Docker image, i.e. `carpentries-workbench:latest`. These images are prebuilt. | ||
|
|
||
| When first opening a devcontainer-enabled lesson the devcontainer system will download the latest image for you. | ||
|
|
||
| If a new version of the Workbench is released, your devcontainer will not automatically use these new versions. To update the devcontainer image, open the VSCode command menu with <kbd>F1</kbd> and select the `Dev Containers: Rebuild Container` option. | ||
| This will download the new image version for you. | ||
|
|
||
| ### Using a specific Workbench Docker version | ||
|
|
||
| Similarly, if you want to use a specific Workbench release, edit the `.devcontainer/Dockerfile` file, replacing `latest` on the first line with the version you require. | ||
|
|
||
| For example, to use Workbench version `dev-0.2.2`: | ||
|
|
||
| ```bash | ||
| FROM carpentries/workbench-docker:latest | ||
| ``` | ||
|
|
||
| becomes | ||
|
|
||
| ```bash | ||
| FROM carpentries/workbench-docker:dev-0.2.2 | ||
| ``` | ||
|
|
||
| Save the file, and rebuild the container by opening the command menu with <kbd>F1</kbd> and selecting the `Dev Containers: Rebuild Container` option. | ||
|
|
||
| ::::::::::::::::::::::: callout | ||
|
|
||
| ### What Docker image versions are available? | ||
|
|
||
| The full list of Docker images and their version _tags_ are [on Dockerhub](https://hub.docker.com/r/carpentries/workbench-docker/tags). | ||
|
|
||
| ::::::::::::::::::::::::::::::: | ||
|
|
||
|
|
||
| ## What's next? | ||
|
|
||
| ### Not used the Workbench before? | ||
|
|
||
| Please follow the [Building your first Workbench lesson](episodes/01-first-lesson.md) to familiarise yourself with the lesson build process. | ||
|
|
||
| ### What content can go in a lesson? | ||
|
|
||
| Please check the [Lesson Content and Styling](episodes/02-content-styling.md) and [Additional Lesson Content](03-additional-content.md) documentation. | ||
|
Check warning on line 89 in learners/devcontainer.md
|
||
|
|
||
| ### Using additional R packages? | ||
|
|
||
| Please familiarise yourself with our [Packages and renv](episodes/04-r-and-renv.md) information. | ||
|
|
||
| ### Lesson in a non-English language? | ||
|
|
||
| Please read our [Internationalisation](episodes/05-il8n.md) guide. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| title: 'Docker Extras' | ||
| --- | ||
|
|
||
| ## Docker | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
bashthe right flavour for this code block?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I was using it just because it was simple text :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps better to make them "flavourless" code blocks?