Skip to content

Commit cbe3e0f

Browse files
Merge pull request #218 from gitpod-io/clu/devcontainer
Fully replace broken `.gitpod.yml` setup with DevContainer setup
2 parents 2b9dca9 + d3d7dc6 commit cbe3e0f

File tree

4 files changed

+41
-82
lines changed

4 files changed

+41
-82
lines changed

.devcontainer/devcontainer.json

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
22
"name": "leeway",
3-
"build": {
4-
"context": "..",
5-
"dockerfile": "../.gitpod.Dockerfile"
3+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
4+
"features": {
5+
"ghcr.io/devcontainers/features/node:1": {
6+
"version": "lts"
7+
},
8+
"ghcr.io/devcontainers/features/go:1": {
9+
"version": "1.24.0"
10+
},
11+
"ghcr.io/devcontainers/features/common-utils:2": {},
12+
"ghcr.io/devcontainers-contrib/features/shfmt:1": {
13+
"version": "3.10.0"
14+
}
615
},
7-
"runArgs": [
8-
"--privileged",
9-
"--security-opt=seccomp=unconfined",
10-
"--network=host"
11-
],
12-
"containerUser": "root"
13-
}
16+
"postStartCommand": "./.devcontainer/install-leeway.sh"
17+
}

.devcontainer/install-leeway.sh

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
# This script downloads and installs the latest version of leeway
3+
4+
set -euo pipefail
5+
6+
# Get the latest leeway version from GitHub API
7+
LATEST_LEEWAY_VERSION=$(curl -s https://api.github.com/repos/gitpod-io/leeway/releases/latest | jq -r '.tag_name' | sed 's/^v//')
8+
9+
# Ensure we got a valid version
10+
if [ -z "$LATEST_LEEWAY_VERSION" ]; then
11+
echo "Error: Could not determine latest leeway version" >&2
12+
exit 1
13+
fi
14+
15+
echo "Installing leeway version: $LATEST_LEEWAY_VERSION"
16+
17+
# Download the latest leeway release
18+
curl -L -o /tmp/leeway.tar.gz "https://github.com/gitpod-io/leeway/releases/download/v${LATEST_LEEWAY_VERSION}/leeway_Linux_x86_64.tar.gz"
19+
20+
# Extract the tarball
21+
tar -xzf /tmp/leeway.tar.gz -C /tmp
22+
23+
# Install leeway to /usr/local/bin
24+
sudo install -m 755 /tmp/leeway /usr/local/bin/
25+
26+
# Clean up temporary files
27+
rm /tmp/leeway.tar.gz /tmp/leeway

.gitpod.Dockerfile

-52
This file was deleted.

.gitpod.yml

-20
This file was deleted.

0 commit comments

Comments
 (0)