Skip to content

Commit f6889fa

Browse files
committed
add development container support
1 parent 9379697 commit f6889fa

File tree

4 files changed

+53
-1
lines changed

4 files changed

+53
-1
lines changed

.devcontainer/Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/ubuntu/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
4+
ARG VARIANT="jammy"
5+
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
6+
7+
# Install additional OS packages, if needed.
8+
RUN apt-get update \
9+
&& apt-get install -y --no-install-recommends ca-certificates
10+
11+
# [Optional] Uncomment this section to install additional OS packages.
12+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
13+
# && apt-get -y install protobuf-compiler

.devcontainer/devcontainer.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"build": {
3+
"dockerfile": "Dockerfile",
4+
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04
5+
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon.
6+
"args": {
7+
"VARIANT": "ubuntu-22.04"
8+
}
9+
},
10+
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
11+
"postCreateCommand": "bash .devcontainer/post-create-command.sh",
12+
"features": {
13+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
14+
"ghcr.io/devcontainers/features/git-lfs:1": {},
15+
"ghcr.io/devcontainers/features/github-cli:1": {},
16+
"ghcr.io/devcontainers/features/go:1": {},
17+
"ghcr.io/katallaxie/devcontainer-features/buf-cli:1": {},
18+
"ghcr.io/guiyomh/features/mage:0": {}
19+
},
20+
"customizations": {
21+
"vscode": {
22+
"extensions": [
23+
"golang.go"
24+
]
25+
}
26+
}
27+
}

.devcontainer/post-create-command.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
# This script is executed after the creation of a new project.
3+
4+
# Install goreleaser pro
5+
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list
6+
sudo apt update
7+
sudo apt install goreleaser-pro

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
<a href="https://www.bestpractices.dev/en/projects/6348" target="_blank"><img alt="cii badge" src="https://img.shields.io/cii/percentage/6348?style=flat-square&label=cii%20best%20practices&color=F8D44B"></a>
2424
&nbsp;
2525
<a href="https://securityscorecards.dev/viewer/?uri=github.com/authzed/spicedb" target="_blank"><img alt="ssf badge" src="https://api.securityscorecards.dev/projects/github.com/authzed/spicedb/badge"></a>
26-
&nbsp;
2726
</p>
2827

2928
<p align="center">
@@ -34,6 +33,12 @@
3433
<a href="https://www.linkedin.com/company/authzed/"><img alt="linkedin badge" src="https://img.shields.io/badge/linkedin-+authzed-2D65BC.svg?style=flat-square"></a>
3534
</p>
3635

36+
<p align="center">
37+
<a href="https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=396856161" target="_blank"><img alt="launch codespaces badge" src="https://img.shields.io/badge/launch-Codespaces-blue?style=flat-square"></a>
38+
&nbsp;
39+
<a href="https://gitpod.io/#https://github.com/authzed/spicedb" target="_blank"><img alt="launch gitpod badge" src="https://img.shields.io/badge/Gitpod-ready--to--code-blue?style=flat-square"></a>
40+
</p>
41+
3742
## What is SpiceDB?
3843

3944
<a href="https://authzed.com#gh-dark-mode-only" target="_blank"><img align="right" width="300" src="https://github.com/user-attachments/assets/e0e70549-91dc-4a07-9309-2e18942a7902" alt="spicedb diagram" /></a>

0 commit comments

Comments
 (0)