diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..130bf7231 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,17 @@ +FROM fedora:34 + +# Install few packages for convenient usage. +# Inspired by the devcontainer in osbuild. +RUN dnf install -y \ + fish \ + fd-find \ + ripgrep \ + jq +# We build composer using RPM, install the tooling +RUN dnf install fedora-packager rpmdevtools go-srpm-macros -y +# The list of requirements is specified in the spec file. +# To install them, dnf needs the "builddep" command. +RUN dnf install 'dnf-command(builddep)' -y +# Copy the specfile and install the dependencies. +COPY osbuild-composer.spec /tmp/osbuild-composer.spec +RUN dnf builddep /tmp/osbuild-composer.spec -y diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..250cb7b99 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,11 @@ +{ + "name": "ComposerBuilder", + "build": { + "dockerfile": "Dockerfile", + "context": ".." + }, + "extensions": [ + "laurenttreguier.rpm-spec", + "golang.Go" + ] +}