Skip to content
Merged
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
11 changes: 11 additions & 0 deletions .github/workflows/docker-image-size-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ jobs:
size_bytes="$(docker image inspect eve-docker-size:current --format '{{.Size}}')"
echo "size_bytes=$size_bytes" >> "$GITHUB_OUTPUT"

- name: Verify sandbox user workspace and sudo permissions
run: |
docker run --rm eve-docker-size:current bash -lc '
set -euo pipefail
test "$(id -un)" = vercel-sandbox
test "$(stat -c %U /workspace)" = vercel-sandbox
git init --quiet /workspace
git -C /workspace remote add origin https://github.com/vercel/eve.git
sudo -n true
'

- name: Generate Docker image size report
env:
BASELINE_LABEL: ${{ steps.baseline.outputs.label }}
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,5 @@ RUN set -eux; \
printf 'vercel-sandbox ALL=(ALL) NOPASSWD:ALL\n' >/etc/sudoers.d/vercel-sandbox; \
chmod 0440 /etc/sudoers.d/vercel-sandbox

USER vercel-sandbox
WORKDIR /workspace
2 changes: 1 addition & 1 deletion docs/sandbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default defineSandbox({
revalidationKey: () => "repo-bootstrap-v1",
async bootstrap({ use }) {
const sandbox = await use();
await sandbox.run({ command: "apt-get install -y jq" });
await sandbox.run({ command: "sudo apt-get install -y jq" });
},
async onSession({ use }) {
await use({ networkPolicy: "deny-all" });
Expand Down