Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f7ec0ba
Test update of the pep image devcontainer
applegath-verily Jun 24, 2025
01cdc83
Added golang and python3
applegath-verily Jun 25, 2025
f574603
Added in app-network
applegath-verily Jun 25, 2025
4c7f05a
Update devcontainer.json
applegath-verily Jun 26, 2025
d3b5ff6
formatting
applegath-verily Jun 26, 2025
ecf6a2f
Update devcontainer.json
applegath-verily Jun 26, 2025
19ad600
Update devcontainer.json
applegath-verily Jun 26, 2025
615d6a6
Update devcontainer.json
applegath-verily Jun 26, 2025
f14dba6
Update devcontainer.json
applegath-verily Jun 26, 2025
be8546b
Update devcontainer.json
applegath-verily Jun 26, 2025
00c38a5
update
applegath-verily Jun 26, 2025
cdf4459
remove .devcontainer.json
applegath-verily Jun 26, 2025
4df38c8
re add .devcontiner.json
applegath-verily Jun 26, 2025
306aafc
update
applegath-verily Jun 26, 2025
4aaa81c
change around order
applegath-verily Jun 26, 2025
b7396fb
Update devcontainer.json
yuhuyoyo Jun 27, 2025
9161865
Added wb startup scripts
applegath-verily Jun 27, 2025
356d594
update for wb change
applegath-verily Jun 27, 2025
ca81860
Added to src and copy of vscode
applegath-verily Jun 27, 2025
bc00315
Update .devcontainer.json
yuhuyoyo Jun 27, 2025
da1ae45
Update docker-compose.yaml
yuhuyoyo Jun 27, 2025
5a2d8bd
update
applegath-verily Jun 27, 2025
78249cc
change
applegath-verily Jun 27, 2025
f677715
added golang and python
applegath-verily Jun 27, 2025
11edc17
update to path and dir name
applegath-verily Jul 11, 2025
db12365
added copilot
applegath-verily Jul 11, 2025
c24d67c
Update .devcontainer.json
applegath-verily Jul 22, 2025
b3e1c3e
cleanup
applegath-verily Jul 29, 2025
d335b16
Fixed devcontainer.json
applegath-verily Jul 29, 2025
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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"postCreateCommand": "npm install -g @devcontainers/cli"
}
}
66 changes: 66 additions & 0 deletions src/pep-cli-acc/.devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "PEP CLI (ACC)",
"dockerComposeFile": "docker-compose.yaml",
"service": "app",
"shutdownAction": "none",
"workspaceFolder": "/workspace",
"postCreateCommand": "./startupscript/post-startup.sh root /config \"${templateOption:cloud}\" \"${templateOption:login}\"; ./sudo-passwordless.sh abc",
// re-mount bucket files on container start up
"postStartCommand": [
"./startupscript/remount-on-restart.sh",
"root",
"/config",
"${templateOption:cloud}",
"${templateOption:login}"
],
"features": {
"ghcr.io/devcontainers/features/java:1.6.3": {
"version": "17"
},
"ghcr.io/devcontainers/features/aws-cli:1.1.1": {},
"ghcr.io/dhoeric/features/google-cloud-cli:1.0.1": {},
"ghcr.io/coder/devcontainer-features/code-server:1": {
"port": 8080,
"host": "0.0.0.0",
"auth": "none"
},
"ghcr.io/devcontainers/features/go:1": {
"version": "1.22"
},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.12"
}
},
"remoteUser": "root",
"customizations": {
"workbench": {
"opens": {
"extensions": [
// Source.
".c",
".cjs",
".cpp",
".go",
".java",
".js",
".mjs",
".php",
".scala",
".sh",
".ts",
// Documents
".md",
".html",
// Data
".csv",
".json",
".jsonc",
".tsv",
".xml",
".yml"
],
"fileUrlSuffix": "?payload=[[\"openFile\",\"vscode-remote:///config/{path}\"]]"
}
}
}
}
17 changes: 17 additions & 0 deletions src/pep-cli-acc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

# PEP Acceptance Image with VScode Server

A Template to run a vscode server on workbench.

## Options

| Options Id | Description | Type | Default Value |
|-----|-----|-----|-----|
| cloud | VM cloud environment | string | gcp |
| login | Whether to log in to workbench CLI | string | false |



---

_Note: This file was auto-generated from the [devcontainer-template.json](https://github.com/verily-src/workbench-app-devcontainers/blob/main/src/vscode/devcontainer-template.json). Add additional notes to a `NOTES.md`._
28 changes: 28 additions & 0 deletions src/pep-cli-acc/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: "2.4"
services:
app:
container_name: "application-server"
image: "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc"
restart: always
volumes:
- .:/workspace:cached
- work:/home/ubuntu:cached
ports:
- "8080:8080"
environment:
USER: "root"
DEFAULT_WORKSPACE: "/config"
SUDO_PASSWORD: "pwd"
networks:
- app-network
cap_add:
- SYS_ADMIN
devices:
- /dev/fuse
security_opt:
- apparmor:unconfined
networks:
app-network:
external: true
volumes:
work:
34 changes: 34 additions & 0 deletions src/pep-cli-acc/sudo-passwordless.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# This script is used to set up passwordless sudo for the core user on the VM.
# It requires to be run with root priviledges and USER_NAME to be set in the environment.
# It is typically called from post-startup.sh.

USER_NAME="${1}"

if [[ -z "${USER_NAME}" ]]; then
echo "Usage: $0 <username>"
exit 1
fi

sudoers_file="/etc/sudoers"
sudoers_d_file="/etc/sudoers.d/${USER_NAME}"

# Make sure user exists
if ! id "${USER_NAME}" &>/dev/null; then
echo "User ${USER_NAME} does not exist."
exit 1
fi

# Check if there's an old rule in the main sudoers file that requires a password
if grep -q "^${USER_NAME} ALL=(ALL:ALL) ALL" "${sudoers_file}"; then
echo "Found password-requiring rule for ${USER_NAME} in /etc/sudoers. Commenting it out."

# Comment out the old rule in /etc/sudoers
sed -i "s/^${USER_NAME} ALL=(ALL:ALL) ALL/# ${USER_NAME} ALL=(ALL:ALL) ALL/" "${sudoers_file}"
fi

echo "${USER_NAME} ALL=(ALL) NOPASSWD:ALL" > "${sudoers_d_file}"
chmod 440 "${sudoers_d_file}"

echo "User ${USER_NAME} has been given passwordless sudo access."