From 61fffcaec6901b03bd4502f51a2537da6e0d8b38 Mon Sep 17 00:00:00 2001 From: Jacob Hrbek Date: Thu, 25 Jun 2020 17:49:27 +0000 Subject: [PATCH] Gitpod: Allow root for priviledged users --- .gitpod.yml | 5 +++-- gitpod/debian.Dockerfile | 22 ++-------------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index db1dc1c..bf3d19f 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,7 +1,8 @@ +privileged: true + image: file: gitpod/debian.Dockerfile - # FIXME: Change gitpod user on GITPOD_GIT_USER_NAME env value tasks: # Does not accept Quotation without '|' ? @@ -30,4 +31,4 @@ vscode: - matklad.rust-analyzer@0.1.20200217:zozmBmOg1N91pRISIsYXBg== - exiasr.hadolint@0.3.0:/FkAW3eTb+z9O7VZAyAa0w== - DavidAnson.vscode-markdownlint@0.34.0:l4DL7iPpo7DdhfUHIUtcuQ== - - yzhang.markdown-all-in-one@2.7.0:5+DmuGcePw8L9PtfgOAAHg== \ No newline at end of file + - yzhang.markdown-all-in-one@2.7.0:5+DmuGcePw8L9PtfgOAAHg== diff --git a/gitpod/debian.Dockerfile b/gitpod/debian.Dockerfile index 787aef6..78f4311 100644 --- a/gitpod/debian.Dockerfile +++ b/gitpod/debian.Dockerfile @@ -1,25 +1,7 @@ FROM debian:latest -# # Blocked by https://github.com/gitpod-io/gitpod/issues/39 -# COPY gitpod/scripts/root-access.sh /usr/bin/root-access -# RUN true "5g5fdhsfd" \ -# && chmod +x /usr/bin/root-access \ -# && /usr/bin/root-access \ -# && rm /usr/bin/root-access - -# # Blocked by https://github.com/gitpod-io/gitpod/issues/1265 -# COPY gitpod/scripts/vm-support.sh /usr/bin/vm-support -# RUN true "8g7as2dga7" \ -# && chmod +x /usr/bin/vm-support \ -# && /usr/bin/vm-support \ -# && rm /usr/bin/vm-support - -# FIXME: Outputs `gitpod@ws-ce281d58-997b-44b8-9107-3f2da7feede3:/workspace/gitpod-tests1$` in terminal -# FIXME: Add hadolint executable -# FIXME: We can use /bin/sh instead of /bin/bash to get minor optimization - # To avoid bricked workspaces (https://github.com/gitpod-io/gitpod/issues/1171) -ARG DEBIAN_FRONTEND=noninteractive +ENV DEBIAN_FRONTEND=noninteractive USER root @@ -36,7 +18,7 @@ RUN useradd \ # Install dependencies RUN apt-get update \ - && apt-get install -y rustc cargo pkg-config \ + && apt-get install -y rustc sudo cargo pkg-config \ && : "Install hadolint if not available in downstream" \ && if ! apt-cache search hadolint | grep -qP "^hadolint -.*"; then { if ! command -v wget >/dev/null; then apt-get install -y wget; fi ;} && wget https://github.com/hadolint/hadolint/releases/download/v1.17.5/hadolint-Linux-x86_64 -O /usr/bin/hadolint && { [ ! -x /usr/bin/hadolint ] && chmod +x /usr/bin/hadolint ;}; elif apt-cache search hadolint | grep -qP "^hadolint -.*"; then apt-get install -y hadolint; fi \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh \