Gitpod: Allow root for priviledged users

This commit is contained in:
Jacob Hrbek 2020-06-25 17:49:27 +00:00
parent af1f10af15
commit 61fffcaec6
2 changed files with 5 additions and 22 deletions

@ -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==
- yzhang.markdown-all-in-one@2.7.0:5+DmuGcePw8L9PtfgOAAHg==

@ -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 \