No project description provided
Project description
[[TOC]]
devcontainers4all: Devcontainers without an IDE
At the moment the only supported devcontainer format is the Visual Studio Code devcontainer.json
manifest and .devcontainer
directory structure.
The only container technology supported is docker, but podman is on its way.
To use such devcontainer, use the d4a
command:
$ d4a --help
Usage: dc [OPTIONS]
Manage the devcontainer
Options:
--repository PATH The repository checkout to mount in the devcontainer
--location PATH The location of the devcontainer definition
--help Show this message and exit.
example: d4a --location ~/location/to/.devcontainer/ --repository ~/Sources/my_repo
Where locaiton is the directory where the devcontainer manifest and Dockerfile are present.
It need to contain at least a VSC-compatible devcontainer.json
and a working Dockerfile.
The manifest needs to contain all the build-args, and all the environment variables required for the build. Note: at the moment only constant are possible for build-args and environmental variables value, even though the VSC manifest supports other variable-expansion syntaxes.
It will use the location
as build directory and will create container image from it.
This image will be executed, the repository
directory will be bind-mounted under /workspace
within the container, and the post-command in the manifest will be executed.
At this point a shell will be available, within the container.
Visual Studio Code DevContainers
Ultimately the aim is to fully support https://code.visualstudio.com/docs/remote/devcontainerjson-reference, with the exceptions of Visual Studio Code specific properties, which would apply only in a VSC environment.
Image or Dockerfile specific properties
At the moment the following limited format is supported (copied by VSC reference):
Property | type | Description |
---|---|---|
build.dockerfile | str | Required when using a Dockerfile. The location of a Dockerfile that defines the contents of the container. The path is relative to the devcontainer.json file. You can find Dockerfiles for different runtimes in the vscode-dev-containers repository. |
build.args | str | A set of name-value pairs containing Docker image build arguments that should be passed when building a Dockerfile. Environment and pre-defined variables may be referenced in the values. Defaults to not set. For example: "build": { "args": { "MYARG": "MYVALUE", "MYARGFROMENVVAR": "${localEnv:VARIABLE_NAME}" } } |
Lifecycle scripts
Property | type | Description |
---|---|---|
postCreateCommand | str, array | This command is the last of three that finalizes container setup when a dev container is created. It happens after updateContentCommand and once the dev container has been assigned to a user for the first time. |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file devcontainers4all-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: devcontainers4all-0.0.4-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0a2 CPython/3.10.1 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d3d9673f8a5a9c441079fa3ac534744690f68818d2839d7e66ba50cd23d3b88 |
|
MD5 | b448c8cb93b13b8c3e880800e55389ea |
|
BLAKE2b-256 | 3f3ffffe512d62e24c096c76492c27f446150b3909a0c49c5f3111c69403429d |