diff --git a/Dockerfile b/Dockerfile index 2d191ab..2b5b73c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,14 +31,20 @@ COPY --from=containerbase /usr/local/bin/ /usr/local/bin/ COPY --from=containerbase /usr/local/containerbase/ /usr/local/containerbase/ RUN install-containerbase -# add required gitpod packages +# add required gitpod and other system packages RUN set -ex; \ - install-apt make shellcheck sudo locales; \ + install-apt \ + g++ \ + locales \ + make \ + shellcheck \ + sudo \ + ; \ locale-gen en_US.UTF-8; \ true # allow sudo without password -RUN echo "gitpod ALL=NOPASSWD:ALL" > /etc/sudoers.d/gitpod; sudo id +RUN echo "$USER_NAME ALL=NOPASSWD:ALL" > /etc/sudoers.d/$USER_NAME; sudo id # renovate: datasource=github-tags packageName=git/git RUN install-tool git v2.43.0 @@ -52,10 +58,13 @@ RUN install-tool docker v24.0.7 # renovate: datasource=github-releases packageName=containerbase/node-prebuild versioning=node RUN install-tool node 20.10.0 -# renovate: datasource=npm -RUN install-tool corepack 0.23.0 +# enable buildin corepack +RUN corepack enable + +# renovate: datasource=github-releases packageName=containerbase/python-prebuild +RUN install-tool python 3.12.0 # prepare some tools for gitpod -RUN prepare-tool python +#RUN prepare-tool python -USER gitpod +USER $USER_NAME diff --git a/README.md b/README.md index df2db39..76ec42c 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,18 @@ A docker base image for Gitpod usage. This repository is the source for the Github container registry image [`ghcr.io/containerbase/gitpod`](https://github.com/containerbase/gitpod/pkgs/container/gitpod). Commits to `main` branch are automatically build and published. + +This image allows `sudo` without password. +It's setting all directiories as safe for git. + +Additional installed packages: + +- docker +- git +- g++ +- make +- nodejs (corepack enabled) +- locales +- python +- shellcheck +- sudo