Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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 README.md
Original file line number Diff line number Diff line change
@@ -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)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo on line 6

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks for finding it! Will edit before merging.

Also sorry for late response.

and configure these images bsed on what we need.
and configure these images bsed on what we need. PRs are welcome!

## 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