diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..67db41d --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,32 @@ +FROM docker.io/alpine:3.22 AS builder + +ARG USERNAME=criudev +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +RUN apk update +RUN apk add cmake \ + make \ + clang \ + llvm \ + git \ + autoconf \ + automake \ + libtool \ + m4 \ + flex \ + bison \ + pkgconfig \ + bash \ + linux-headers \ + patch \ + coreutils \ + gettext \ + gettext-dev + +RUN apk add sudo +RUN adduser -D -u $USER_UID -g $USER_GID $USERNAME \ + && addgroup $USERNAME wheel \ + && sed -i 's/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers + +USER $USERNAME diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..2322e2f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,12 @@ +{ + "build": { + "dockerfile": "Dockerfile" + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools-extension-pack" + ] + } + } +} diff --git a/.gitignore b/.gitignore index bd491c1..1ebb568 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ build/ dist/ CMakeCache.txt _CPack_Packages +.vscode/ +.idea/ +*.swp +*.swo diff --git a/README.md b/README.md index 0d46681..2a61b15 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ having it will make the final artifact more complete. ## Build +**Note:** in case you don't want to do the setup yourself we provide a [devcontainer](https://containers.dev/) for this project. + We only tested this in Alpine Linux, building on other Linux distributions should work but the instructions below should work on most major linux distros.