From 0fb5027a0c32a64f41cccb142e1e9e5197f425c5 Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Eugenio Halili Date: Thu, 18 Jun 2020 18:16:25 +0800 Subject: [PATCH 1/6] [full] Use Debian instead, as @pokurt recommended Signed-off-by: Andrei Jiroh Eugenio Halili --- .circleci/config.yml | 9 +- custom-images/debian/.gitkeep | 0 .../{ubuntu => }/gp-workspace-full/Dockerfile | 88 ++++++++++++------- .../gp-workspace-full/apache2/apache2.conf | 0 .../gp-workspace-full/apache2/envvars | 0 .../gp-workspace-full/ngnix/ngnix.conf | 0 .../gp-workspace-full/nvm-lazy.sh | 0 .../gp-workspace-full/tests/lang-c.yaml | 0 .../gp-workspace-full/tests/lang-go.yaml | 0 .../gp-workspace-full/tests/lang-java.yaml | 0 .../gp-workspace-full/tests/lang-node.yaml | 0 .../gp-workspace-full/tests/lang-php.yaml | 0 .../gp-workspace-full/tests/lang-python.yaml | 0 .../gp-workspace-full/tests/lang-ruby.yaml | 0 .../gp-workspace-full/tests/lang-rust.yaml | 0 .../gp-workspace-full/tests/prologue.yaml | 0 .../gp-workspace-full/tests/tool-brew.yaml | 0 custom-images/ubuntu/.gitkeep | 0 startDockerImageBuild.sh | 25 ++++++ 19 files changed, 87 insertions(+), 35 deletions(-) delete mode 100644 custom-images/debian/.gitkeep rename custom-images/{ubuntu => }/gp-workspace-full/Dockerfile (89%) rename custom-images/{ubuntu => }/gp-workspace-full/apache2/apache2.conf (100%) rename custom-images/{ubuntu => }/gp-workspace-full/apache2/envvars (100%) rename custom-images/{ubuntu => }/gp-workspace-full/ngnix/ngnix.conf (100%) rename custom-images/{ubuntu => }/gp-workspace-full/nvm-lazy.sh (100%) rename custom-images/{ubuntu => }/gp-workspace-full/tests/lang-c.yaml (100%) rename custom-images/{ubuntu => }/gp-workspace-full/tests/lang-go.yaml (100%) rename custom-images/{ubuntu => }/gp-workspace-full/tests/lang-java.yaml (100%) rename custom-images/{ubuntu => }/gp-workspace-full/tests/lang-node.yaml (100%) rename custom-images/{ubuntu => }/gp-workspace-full/tests/lang-php.yaml (100%) rename custom-images/{ubuntu => }/gp-workspace-full/tests/lang-python.yaml (100%) rename custom-images/{ubuntu => }/gp-workspace-full/tests/lang-ruby.yaml (100%) rename custom-images/{ubuntu => }/gp-workspace-full/tests/lang-rust.yaml (100%) rename custom-images/{ubuntu => }/gp-workspace-full/tests/prologue.yaml (100%) rename custom-images/{ubuntu => }/gp-workspace-full/tests/tool-brew.yaml (100%) delete mode 100644 custom-images/ubuntu/.gitkeep create mode 100644 startDockerImageBuild.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index a708320..d394192 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.0 jobs: - workspace-full: + debian-workspace-full: docker: - image: csweichel/dazzle:latest steps: @@ -9,9 +9,8 @@ jobs: - setup_remote_docker - run: command: | - chmod 777 ./.circleci/dazzle_build_image.sh - chmod 777 ./.circleci/build_image.sh - ./.circleci/dazzle_build_image.sh custom-images/ubuntu/gp-workspace-full/Dockerfile madebythepinshub/gp-workspace-full workspace-full.tar + chmod 777 startDockerBuild.sh + ./startDockerBuild custom-images/debian/gp-workspace-full/Dockerfile madebythepinsteam/gp-workspace-full no_output_timeout: 30m - run: name: Save test results @@ -32,4 +31,4 @@ workflows: version: 2 build-and-deploy: jobs: - - workspace-full + - debian-workspace-full diff --git a/custom-images/debian/.gitkeep b/custom-images/debian/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/custom-images/ubuntu/gp-workspace-full/Dockerfile b/custom-images/gp-workspace-full/Dockerfile similarity index 89% rename from custom-images/ubuntu/gp-workspace-full/Dockerfile rename to custom-images/gp-workspace-full/Dockerfile index faac597..95c33cd 100644 --- a/custom-images/ubuntu/gp-workspace-full/Dockerfile +++ b/custom-images/gp-workspace-full/Dockerfile @@ -1,38 +1,66 @@ -## Copied from https://github.com/gitpod-io/workspace-images/blob/master/full/Dockerfile -## And then customized based on our needs - -FROM buildpack-deps:focal +FROM buildpack-deps:buster ### base ### -RUN yes | unminimize \ - && apt-get install -yq \ - zip \ - unzip \ - bash-completion \ - build-essential \ - htop \ - jq \ - less \ - locales \ - man-db \ - nano \ - software-properties-common \ - sudo \ - time \ - vim \ - multitail \ - lsof \ - && locale-gen en_US.UTF-8 \ - && mkdir /var/lib/apt/dazzle-marks \ - && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* +RUN set -ex; \ + apt-get update; \ +# make sure debconf doesn't try to prompt (e.g. tzdata on Ubuntu) + DEBIAN_FRONTEND=noninteractive \ + apt-get install -y --no-install-recommends \ + autoconf \ + automake \ + bzip2 \ + dpkg-dev \ + file \ + g++ \ + gcc \ + imagemagick \ + libbz2-dev \ + libc6-dev \ + libcurl4-openssl-dev \ + libdb-dev \ + libevent-dev \ + libffi-dev \ + libgdbm-dev \ + libglib2.0-dev \ + libgmp-dev \ + libjpeg-dev \ + libkrb5-dev \ + liblzma-dev \ + libmagickcore-dev \ + libmagickwand-dev \ + libmaxminddb-dev \ + libncurses5-dev \ + libncursesw5-dev \ + libpng-dev \ + libpq-dev \ + libreadline-dev \ + libsqlite3-dev \ + libssl-dev \ + libtool \ + libwebp-dev \ + libxml2-dev \ + libxslt-dev \ + libyaml-dev \ + make \ + patch \ + unzip \ + xz-utils \ + zlib1g-dev \ + \ +# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html + $( \ +# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep + if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \ + echo 'default-libmysqlclient-dev'; \ + else \ + echo 'libmysqlclient-dev'; \ + fi \ + ) \ + ; \ + rm -rf /var/lib/apt/lists/* ENV LANG=en_US.UTF-8 -### Install Git ### -RUN add-apt-repository -y ppa:git-core/ppa \ - && apt-get install -yq git \ - && rm -rf /var/lib/apt/lists/* - ### Create an generic Gitpod user ### RUN useradd -l -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod \ && echo "gitpod:gitpod" | chpasswd diff --git a/custom-images/ubuntu/gp-workspace-full/apache2/apache2.conf b/custom-images/gp-workspace-full/apache2/apache2.conf similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/apache2/apache2.conf rename to custom-images/gp-workspace-full/apache2/apache2.conf diff --git a/custom-images/ubuntu/gp-workspace-full/apache2/envvars b/custom-images/gp-workspace-full/apache2/envvars similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/apache2/envvars rename to custom-images/gp-workspace-full/apache2/envvars diff --git a/custom-images/ubuntu/gp-workspace-full/ngnix/ngnix.conf b/custom-images/gp-workspace-full/ngnix/ngnix.conf similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/ngnix/ngnix.conf rename to custom-images/gp-workspace-full/ngnix/ngnix.conf diff --git a/custom-images/ubuntu/gp-workspace-full/nvm-lazy.sh b/custom-images/gp-workspace-full/nvm-lazy.sh similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/nvm-lazy.sh rename to custom-images/gp-workspace-full/nvm-lazy.sh diff --git a/custom-images/ubuntu/gp-workspace-full/tests/lang-c.yaml b/custom-images/gp-workspace-full/tests/lang-c.yaml similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/tests/lang-c.yaml rename to custom-images/gp-workspace-full/tests/lang-c.yaml diff --git a/custom-images/ubuntu/gp-workspace-full/tests/lang-go.yaml b/custom-images/gp-workspace-full/tests/lang-go.yaml similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/tests/lang-go.yaml rename to custom-images/gp-workspace-full/tests/lang-go.yaml diff --git a/custom-images/ubuntu/gp-workspace-full/tests/lang-java.yaml b/custom-images/gp-workspace-full/tests/lang-java.yaml similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/tests/lang-java.yaml rename to custom-images/gp-workspace-full/tests/lang-java.yaml diff --git a/custom-images/ubuntu/gp-workspace-full/tests/lang-node.yaml b/custom-images/gp-workspace-full/tests/lang-node.yaml similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/tests/lang-node.yaml rename to custom-images/gp-workspace-full/tests/lang-node.yaml diff --git a/custom-images/ubuntu/gp-workspace-full/tests/lang-php.yaml b/custom-images/gp-workspace-full/tests/lang-php.yaml similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/tests/lang-php.yaml rename to custom-images/gp-workspace-full/tests/lang-php.yaml diff --git a/custom-images/ubuntu/gp-workspace-full/tests/lang-python.yaml b/custom-images/gp-workspace-full/tests/lang-python.yaml similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/tests/lang-python.yaml rename to custom-images/gp-workspace-full/tests/lang-python.yaml diff --git a/custom-images/ubuntu/gp-workspace-full/tests/lang-ruby.yaml b/custom-images/gp-workspace-full/tests/lang-ruby.yaml similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/tests/lang-ruby.yaml rename to custom-images/gp-workspace-full/tests/lang-ruby.yaml diff --git a/custom-images/ubuntu/gp-workspace-full/tests/lang-rust.yaml b/custom-images/gp-workspace-full/tests/lang-rust.yaml similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/tests/lang-rust.yaml rename to custom-images/gp-workspace-full/tests/lang-rust.yaml diff --git a/custom-images/ubuntu/gp-workspace-full/tests/prologue.yaml b/custom-images/gp-workspace-full/tests/prologue.yaml similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/tests/prologue.yaml rename to custom-images/gp-workspace-full/tests/prologue.yaml diff --git a/custom-images/ubuntu/gp-workspace-full/tests/tool-brew.yaml b/custom-images/gp-workspace-full/tests/tool-brew.yaml similarity index 100% rename from custom-images/ubuntu/gp-workspace-full/tests/tool-brew.yaml rename to custom-images/gp-workspace-full/tests/tool-brew.yaml diff --git a/custom-images/ubuntu/.gitkeep b/custom-images/ubuntu/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/startDockerImageBuild.sh b/startDockerImageBuild.sh new file mode 100644 index 0000000..d849d8f --- /dev/null +++ b/startDockerImageBuild.sh @@ -0,0 +1,25 @@ +#!/bin/sh +set -xe + +usage=""" +Usage: + $0 DOCKERFILE IMAGE_NAME [ --dazzle IMAGE_NAME.tar ] + +Parameters: + DOCKERFILE Directory to your Dockerfile + IMAGE_NAME Image name to be used for this build + +Flags: + --dazzle IMAGE_NAME.tar Mandatory for exporting latest builds as tar file. +""" + +if [[ $# -ne 2 ]]; then + echo usage + exit 2 +fi + +while getopts dazzle option +do +sh ./circleci/dazzle_build_image.sh $1 $2 ${OPTARGS} +esac +done \ No newline at end of file From 517b343c82988ba9e979cbe288abf7bdf4c4dcf8 Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Eugenio Halili Date: Thu, 18 Jun 2020 18:29:35 +0800 Subject: [PATCH 2/6] [repo] Update README [skip ci] Signed-off-by: Andrei Jiroh Eugenio Halili --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c750776..b93993f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # Custom Gitpod Workspace Images with `sudo` + + We build customized Gitpod Workspace images for your need, with `sudo` access. We had to browow stuff from [the official Git repository](https://github.com/gitpod-io/workspace-images) -and configure these images bsed on what we need. +and configure these images bsed on what we need. PRs are welcome! ## Installation From 9fecfe4ec96677e1ce2ded9b0eed5be79de8a0cf Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Eugenio Halili Date: Thu, 18 Jun 2020 18:30:03 +0800 Subject: [PATCH 3/6] [circleci] Use Dazzle for stuff [skip ci] Signed-off-by: Andrei Jiroh Eugenio Halili --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d394192..fa4de82 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: - run: command: | chmod 777 startDockerBuild.sh - ./startDockerBuild custom-images/debian/gp-workspace-full/Dockerfile madebythepinsteam/gp-workspace-full + ./startDockerBuild custom-images/debian/gp-workspace-full/Dockerfile madebythepinsteam/gp-workspace-full --dazzle madebythepinsteam/gp-workspace-full.tar no_output_timeout: 30m - run: name: Save test results From 5530715ca639f2e7ce6f6a7199a679707fd2c679 Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Eugenio Halili Date: Wed, 10 Mar 2021 20:34:32 +0800 Subject: [PATCH 4/6] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b93993f..a29848b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Custom Gitpod Workspace Images with `sudo` - - We build customized Gitpod Workspace images for your need, with `sudo` access. We had -to browow stuff from [the official Git repository](https://github.com/gitpod-io/workspace-images) +to borrow stuff from [the official Git repository](https://github.com/gitpod-io/workspace-images) and configure these images bsed on what we need. PRs are welcome! +Please be reminded that these are currently WIP, so use with caution. + ## Installation ### Local Installation From d2dbdec0ea944942c6b1a1372123936675d3f6b2 Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Eugenio Halili Date: Wed, 10 Mar 2021 20:36:41 +0800 Subject: [PATCH 5/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a29848b..0a78d42 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Custom Gitpod Workspace Images with `sudo` +# Custom Gitpod Workspace Images We build customized Gitpod Workspace images for your need, with `sudo` access. We had to borrow stuff from [the official Git repository](https://github.com/gitpod-io/workspace-images) From 32bcb69af764eccf78c869b5bb313b22a8707269 Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Eugenio Halili Date: Wed, 10 Mar 2021 20:39:34 +0800 Subject: [PATCH 6/6] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f17193..fd0ac40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ # Changelog History -We're not yet wrote any changelog here. To see what changed in real-time, see the commit history. +## Current - WIP + +* Renamed repo to `custom-gp-workspaces` since `sudo` are now available under an feature flag in Gitpod.io.