From df79df178bad884173b3370a7a1d2d930c76ea8e Mon Sep 17 00:00:00 2001 From: Kreyren Date: Mon, 24 Feb 2020 04:38:20 +0000 Subject: [PATCH] dsagasdg --- .gitpod.yml | 16 ++++++++++++++++ .hadolint.yaml | 11 +++++++++++ .hadolint.yml | 5 ----- gitpod/debian.Dockerfile | 18 ++++++++---------- 4 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 .hadolint.yaml delete mode 100644 .hadolint.yml diff --git a/.gitpod.yml b/.gitpod.yml index 35b1f02..db1dc1c 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,6 +1,22 @@ image: file: gitpod/debian.Dockerfile + +# FIXME: Change gitpod user on GITPOD_GIT_USER_NAME env value +tasks: + # Does not accept Quotation without '|' ? + - init: | + printf 'FIXME: %s\n' "Get rid of me" + command: | + printf 'FIXME: %s\n' "This is a hotfix for https://github.com/gitpod-io/gitpod/issues/1252 manipulating PS1 env var" + # FIXME: The color of second line does not transfer to the environment unless Ctrl+C is pressed + export PS1="\033[1m\e[38;5;201m[ \t : \w : EXIT \$? ]\033[0m\e[38;5;011m\n\u@gitpod \\$ \[$(tput sgr0)\]" + # ^^^^^^^ - bolt + # ^^^^^^^^^^^^ - Purple color + # ^^^^^^ - remove bolt + # ^^^^^^^^^^^ - Gold color + clear + vscode: extensions: - kalitaalexey.vscode-rust@0.4.2:iw09QffwKU6Xcxr7C2zalA== diff --git a/.hadolint.yaml b/.hadolint.yaml new file mode 100644 index 0000000..90b65f9 --- /dev/null +++ b/.hadolint.yaml @@ -0,0 +1,11 @@ +ignored: + - DL3007 # Usage of latest version is expected + - DL3008 # Pinning specific version on apt is not sane + - DL3015 # We don't mind recommended packages + - DL4006 # False-trigger on /bin/sh usage? + +trustedRegistries: + - docker.io + - debian + - gitpod + - hadolint \ No newline at end of file diff --git a/.hadolint.yml b/.hadolint.yml deleted file mode 100644 index 5c44b0d..0000000 --- a/.hadolint.yml +++ /dev/null @@ -1,5 +0,0 @@ -trustedRegistries: - - docker.io - - debian - - gitpod - - hadolint \ No newline at end of file diff --git a/gitpod/debian.Dockerfile b/gitpod/debian.Dockerfile index 28f7264..b5ebadf 100644 --- a/gitpod/debian.Dockerfile +++ b/gitpod/debian.Dockerfile @@ -3,15 +3,13 @@ FROM debian:latest # FIXME: Outputs `gitpod@ws-ce281d58-997b-44b8-9107-3f2da7feede3:/workspace/gitpod-tests1$` in terminal # FIXME: Add hadolint executable - # To avoid bricked workspaces (https://github.com/gitpod-io/gitpod/issues/1171) ARG DEBIAN_FRONTEND=noninteractive -# Customize PS1 to be more usable -ARG PS1="[ \t : \w : EXIT \$? ]\n\u@gitpod \\$ \[$(tput sgr0)\]" - USER root +SHELL ["/bin/sh"] + ENV LANG=en_US.UTF-8 ENV LC_ALL=C @@ -24,13 +22,11 @@ RUN useradd \ gitpod || exit 1 # Install dependencies -RUN apt update \ - && apt upgrade -y \ - && apt dist-upgrade -y \ - && apt install -y rustc cargo \ +RUN apt-get update \ + && apt-get install -y rustc 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 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 install -y hadolint; fi \ - && apt autoremove -y \ + && 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 \ + && apt-get autoremove -y \ && rm -rf /var/lib/apt/lists/* # Add custom functions @@ -38,3 +34,5 @@ RUN if ! grep -qF 'ix()' /etc/bash.bashrc; then printf '%s\n' \ '# Custom' \ "ix() { curl -F 'f:1=<-' ix.io 2>/dev/null ;}" \ >> /etc/bash.bashrc; fi + +USER gitpod \ No newline at end of file