Skip to content

Instantly share code, notes, and snippets.

Last active May 29, 2022
What would you like to do?
bootstrap a new dev server
#!/usr/bin/env bash
set -eo pipefail
install-docker() {
if command -v /usr/bin/docker >/dev/null 2>&1; then
apt update
apt -y install ca-certificates curl gnupg lsb-release
mkdir -p /etc/apt/keyrings
curl -fsSL | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
apt -y install docker-ce docker-ce-cli docker-compose-plugin
main() {
echo "====> Installing Docker"
echo "====> Creating codeserver directory"
mkdir -p /var/lib/code-server
chown 1000:1000 /var/lib/code-server
echo "====> Done!"
main "$@"
FROM gitpod/openvscode-server:latest
USER root
ARG GO_VERSION=1.18.2.linux-amd64
RUN curl -o /tmp/go.tar.gz -sSL && \
tar -C /usr/local -xzf /tmp/go.tar.gz && \
rm -rf /tmp/go.tar.gz
USER openvscode-server
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment