devcontainer: support for vs code devcontainer
Add a support for developing osbuild via Visual Studio Code Remote Containers[1]. VS Code, if the extension is installed, will automatically build the specified container via the supplied Dockerfile and start a a VS Code server instance in it and connect to it. The container has the dependencies to develop osbuild, which includes running the test and building images. For this the container is started with `--privileged` since osbuild needs various capabilities. NB: not all extensions that are installed on the host are automatically installed; instead a handful of basic ones that are needed for python development are pre-installed. [1] https://code.visualstudio.com/docs/remote/containers
This commit is contained in:
parent
c923457683
commit
b6642db7a2
2 changed files with 48 additions and 0 deletions
20
.devcontainer/Dockerfile
Normal file
20
.devcontainer/Dockerfile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
FROM fedora
|
||||
RUN dnf install -y \
|
||||
fish \
|
||||
git \
|
||||
jq \
|
||||
make \
|
||||
qemu-img \
|
||||
osbuild \
|
||||
osbuild-ostree \
|
||||
pylint \
|
||||
python3-autopep8 \
|
||||
python3-devel \
|
||||
python3-docutils \
|
||||
python3-iniparse \
|
||||
python3-jsonschema \
|
||||
python3-pip \
|
||||
python3-pylint \
|
||||
python3-pytest \
|
||||
rpm-build \
|
||||
selinux-policy-devel
|
||||
28
.devcontainer/devcontainer.json
Normal file
28
.devcontainer/devcontainer.json
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"name": "osbuild",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"context": "..",
|
||||
},
|
||||
"runArgs": [
|
||||
"--privileged"
|
||||
],
|
||||
"settings": {
|
||||
"terminal.integrated.shell.linux": "/bin/fish",
|
||||
"python.pythonPath": "/usr/bin/python",
|
||||
"python.linting.enabled": true,
|
||||
"python.linting.pylintEnabled": true,
|
||||
"python.testing.unittestEnabled": false,
|
||||
"python.testing.nosetestsEnabled": false,
|
||||
"python.testing.pyTestEnabled": true,
|
||||
"python.testing.pyTestArgs": [
|
||||
"test"
|
||||
]
|
||||
},
|
||||
"extensions": [
|
||||
"editorconfig.editorconfig",
|
||||
"laurenttreguier.rpm-spec",
|
||||
"ms-python.python",
|
||||
"ms-python.vscode-pylance"
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue