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

Added devcontainer for quick setup in vscode #134

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
39 changes: 39 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
{
"name": "MACH-Aero-tutorial",
"image": "mdolab/public:u22-gcc-ompi-latest-amd64",
"containerEnv": {
"DISPLAY": "${localEnv:DISPLAY}"
},
"runArgs": [
"--network=host"
],
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
}
}
},
"extensions": [
"ms-python.python",
"ms-python.autopep8",
"ms-python.vscode-pylance",
"ms-azuretools.vscode-docker"
]
}
}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
12 changes: 12 additions & 0 deletions installInstructions/dockerInstructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,15 @@ Run ``exec`` to enter the container:
.. note::
Running system commands or installing system software inside the container, e.g. using ``apt-get`` requires running ``sudo``, followed by a password.
The following password can be used in all images, ``temppass``.


Using Docker in a Devcontainer
==============================

Install (all steps are [here](https://code.visualstudio.com/docs/devcontainers/containers))
- docker (you should have this installed from the previous step)
- vscode
- devcontainer extension

After this, just open the repository in vscode, click open in devcontainer.
You should be able to just open a new terminal in vscode, and it should open inside the docker automatically