Skip to content

Commit 8e28ccd

Browse files
committed
Add arch-linuxserver DevContainer template
Added new DevContainer template for GUI application development with web-based desktop access using LinuxServer.io images Provides web-accessible desktop environments (KDE, XFCE, i3, MATE, KasmVNC) for remote GUI development workflows and cross-platform compatibility Task: [15](#15)
1 parent a26376c commit 8e28ccd

File tree

12 files changed

+1004
-5
lines changed

12 files changed

+1004
-5
lines changed

.github/workflows/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ act workflow_dispatch -W .github/workflows/test-local.yaml
3131

3232
# Test specific template
3333
act workflow_dispatch -W .github/workflows/test-local.yaml --input template=arch-base
34+
act workflow_dispatch -W .github/workflows/test-local.yaml --input template=arch-linuxserver
3435
```
3536

3637
## 🔧 Adding New Templates

.github/workflows/test-local.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ jobs:
2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
templates:
31+
templates:
3232
- arch-base
33+
- arch-linuxserver
3334
steps:
3435
- name: Checkout repository
3536
uses: actions/checkout@v3

.github/workflows/test-pr.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
with:
1515
filters: |
1616
arch-base: ./**/arch-base/**
17+
arch-linuxserver: ./**/arch-linuxserver/**
1718
1819
test:
1920
needs: [detect-changes]

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A collection of templates for VS Code Dev Containers, designed for quick develop
77
1. 📂 Open VS Code in your project folder
88
2. ⌨️ Press `Ctrl+Shift+P` and select "Dev Containers: Add Dev Container Configuration Files..."
99
3. 📋 Choose "Show All Definitions..."
10-
4. 🔍 In the search field, enter: `ghcr.io/zyrakq/arch-devcontainer-templates/arch-base`
10+
4. 🔍 In the search field, enter: `ghcr.io/zyrakq/arch-devcontainer-templates/arch-base` or `ghcr.io/zyrakq/arch-devcontainer-templates/arch-linuxserver`
1111
5. ✅ Select the desired template from the list
1212

1313
## 📦 Available Templates
@@ -19,6 +19,14 @@ Base template based on Arch Linux with:
1919
- 💾 Separate volumes for home directory and workspace
2020
- 🔒 Custom network isolation
2121

22+
### 🖥️ arch-linuxserver
23+
Desktop template based on LinuxServer.io images with:
24+
- 🌐 Web-based GUI access via browser (port 3000)
25+
- 🖥️ 5 desktop environments: KDE, i3, MATE, XFCE, or terminal-only (kasmvnc)
26+
- 🐧 Arch Linux base with LinuxServer.io optimizations
27+
- 👤 User `abc` with HOME at `/config`
28+
- 🔧 PUID/PGID support for proper file permissions
29+
2230
## ⚡ Available Features
2331

2432
| Feature | Repository |
@@ -40,7 +48,15 @@ Base template based on Arch Linux with:
4048
## ⚙️ Template Parameters
4149

4250
When using the template, you'll be prompted to specify:
51+
52+
### arch-base
53+
- 📝 **Project Name**: Project name (used for container and network names)
54+
55+
### arch-linuxserver
56+
- 🎨 **Desktop Environment**: Choose from kasmvnc, kde, i3, mate, or xfce
4357
- 📝 **Project Name**: Project name (used for container and network names)
58+
- 🏷️ **Title**: Title displayed in the web interface
59+
- 🕐 **Timezone**: Timezone for the container (e.g., Europe/London, America/New_York)
4460

4561
## 📁 Template Structure
4662

TESTING.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,18 @@ act workflow_dispatch -W .github/workflows/test-local.yaml
3737
### 🎯 Testing specific template
3838
```bash
3939
# Test specific template
40-
act workflow_dispatch -W .github/workflows/test-local.yaml --input template=arch-base
40+
act workflow_dispatch -W .github/workflows/test-local.yaml --input template=arch-linuxserver
4141
```
4242

4343
### 🛠️ Manual testing
4444
```bash
45-
# Direct smoke-test execution for specific template
45+
# Direct smoke-test execution for arch-base
4646
./.github/actions/smoke-test/build.sh arch-base
4747
./.github/actions/smoke-test/test.sh arch-base
48+
49+
# Direct smoke-test execution for arch-linuxserver
50+
./.github/actions/smoke-test/build.sh arch-linuxserver
51+
./.github/actions/smoke-test/test.sh arch-linuxserver
4852
```
4953
## 📋 Workflow Types
5054

@@ -61,6 +65,7 @@ act workflow_dispatch -W .github/workflows/test-local.yaml --input template=arch
6165
- **Commands:**
6266
- All: `act workflow_dispatch -W .github/workflows/test-local.yaml`
6367
- Single: `act workflow_dispatch -W .github/workflows/test-local.yaml --input template=arch-base`
68+
- LinuxServer: `act workflow_dispatch -W .github/workflows/test-local.yaml --input template=arch-linuxserver`
6469

6570
## �️ Testing structure
6671

@@ -81,6 +86,14 @@ The `test/arch-base/test.sh` file contains detailed tests:
8186
- 📁 File system verification
8287
- 🔧 Environment variables testing
8388

89+
The `test/arch-linuxserver/test.sh` file contains LinuxServer-specific tests:
90+
- 🖥️ Desktop environment verification
91+
- 🌐 Web interface accessibility (port 3000)
92+
- 👤 LinuxServer user configuration (`abc` user)
93+
- 🔧 PUID/PGID environment variables
94+
- 📁 Volume mount verification (`/config`, `/workspace`)
95+
- 🎨 Desktop environment specific checks
96+
8497
## 🔧 Troubleshooting
8598

8699
### 🐳 Docker issues

src/arch-base/NOTES.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ sudo pacman-key --refresh-keys
167167
- 📚 **Documentation**: [GitHub Repository](https://github.com/zyrakq/devcontainer-templates)
168168
- 🐛 **Issues**: Report issues via GitHub Issues
169169
- 📖 **Arch Wiki**: [Arch Linux Wiki](https://wiki.archlinux.org/)
170-
- 🐳 **Dev Containers**: [Official Documentation](https://containers.dev/)
170+
- 🔗 **Related Templates**:
171+
- **[Arch Linux Base](../arch-base/NOTES.md)** - Minimalist Arch Linux environment without desktop (current)
172+
- **[Arch Linux Desktop](../arch-linuxserver/NOTES.md)** - Full desktop environment with web access
173+
-**Dev Containers**: [Official Documentation](https://containers.dev/)
171174
- 🔗 **Related Projects**:
172175
- [bartventer/devcontainer-images](https://github.com/bartventer/devcontainer-images/) - Comprehensive collection of Dev Container images and features
173176
- [bartventer/arch-devcontainer-features](https://github.com/bartventer/arch-devcontainer-features/) - DevContainer features for Arch Linux by bartventer
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
ARG BASE_IMAGE="lscr.io/linuxserver/webtop:arch-kde"
2+
3+
FROM ${BASE_IMAGE}
4+
5+
LABEL org.opencontainers.image.title="Arch Linux Desktop (LinuxServer)"
6+
LABEL org.opencontainers.image.source="https://github.com/zyrakq/arch-devcontainer-templates"
7+
LABEL org.opencontainers.image.description="Arch Linux with desktop environment using LinuxServer.io images"
8+
LABEL org.opencontainers.image.licenses="MIT"
9+
LABEL org.opencontainers.image.authors="Zyrakq <serg.shehov@tutanota.com>"
10+
11+
# Adjust directory permissions
12+
RUN chmod 555 /srv/ftp && \
13+
chmod 755 /usr/share/polkit-1/rules.d/
14+
15+
# Initialize pacman keyring and upgrade system
16+
RUN pacman-key --init && \
17+
pacman-key --populate archlinux && \
18+
pacman -Sy --needed --noconfirm --disable-download-timeout archlinux-keyring && \
19+
pacman -Su --noconfirm --disable-download-timeout
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "${templateOption:projectName} Desktop (LinuxServer)",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": ".",
6+
"args": {
7+
"BASE_IMAGE": "${templateOption:baseImage}"
8+
}
9+
},
10+
"workspaceFolder": "/workspace/${templateOption:projectName}",
11+
"workspaceMount": "source=${templateOption:projectName}-workspace,target=/workspace/${templateOption:projectName},type=volume",
12+
"mounts": [
13+
"source=${templateOption:projectName}-home,target=/config,type=volume"
14+
],
15+
"remoteUser": "abc",
16+
"remoteEnv": {
17+
"HOME": "/config"
18+
},
19+
"containerEnv": {
20+
"PUID": "1000",
21+
"PGID": "1000",
22+
"TZ": "${templateOption:timezone}",
23+
"TITLE": "${templateOption:title}"
24+
},
25+
"runArgs": [
26+
"--name=${templateOption:projectName}-devcontainer",
27+
"--hostname=${templateOption:projectName}",
28+
"--network=${templateOption:projectName}-network",
29+
"--shm-size=1gb"
30+
],
31+
"features": {
32+
"ghcr.io/bartventer/arch-devcontainer-features/common-utils:1": {
33+
"username": "abc",
34+
"additionalPackages": "base-devel",
35+
"installZsh": true,
36+
"installOhMyZsh": true,
37+
"configureZshAsDefaultShell": true
38+
}
39+
},
40+
"initializeCommand": "docker network create ${templateOption:projectName}-network 2>/dev/null || true",
41+
"forwardPorts": [
42+
3000
43+
],
44+
"portsAttributes": {
45+
"3000": {
46+
"label": "Desktop Environment",
47+
"onAutoForward": "openBrowser"
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)