Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
version: 2.0

jobs:
workspace-full:
debian-workspace-full:
docker:
- image: csweichel/dazzle:latest
steps:
- checkout
- 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 --dazzle madebythepinsteam/gp-workspace-full.tar
no_output_timeout: 30m
- run:
name: Save test results
Expand All @@ -32,4 +31,4 @@ workflows:
version: 2
build-and-deploy:
jobs:
- workspace-full
- debian-workspace-full
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# 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 browow stuff from [the official Git repository](https://github.com/gitpod-io/workspace-images)
and configure these images bsed on what we need.
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

Expand Down
Empty file removed custom-images/debian/.gitkeep
Empty file.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Empty file removed custom-images/ubuntu/.gitkeep
Empty file.
25 changes: 25 additions & 0 deletions startDockerImageBuild.sh
Original file line number Diff line number Diff line change
@@ -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