You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`latest`|**Upstream Binary**. Built from official release. | Most users. Matches Linux Docker behavior. |
25
24
26
25
## Prerequisites
27
-
28
26
Before deploying, ensure your host environment is ready. See the [Quick Start Guide](https://daemonless.io/guides/quick-start) for host setup instructions.
29
27
30
28
## Deployment
@@ -34,33 +32,42 @@ Before deploying, ensure your host environment is ready. See the [Quick Start Gu
34
32
```yaml
35
33
services:
36
34
code-server:
37
-
image: ghcr.io/daemonless/code-server:latest
35
+
image: "ghcr.io/daemonless/code-server:latest"
38
36
container_name: code-server
39
37
environment:
40
-
- PUID=1000
41
-
- PGID=1000
42
-
- TZ=UTC
38
+
- PUID=1000 # User ID for the application process
39
+
- PGID=1000 # Group ID for the application process
40
+
- TZ=UTC # Timezone for the container
41
+
- PASSWORD=<PASSWORD> # Password for web UI (leave unset to disable auth)
42
+
- DEFAULT_WORKSPACE= # Default folder opened in the editor (default: /config/workspace)
43
+
- DISABLE_MDO= # Do not use FreeBSD's mac_do facility to allow executing commands as root from the terminal (optional)
43
44
volumes:
44
45
- "/path/to/containers/code-server:/config"
45
46
ports:
46
-
- 8080:8080
47
+
- "8080:8080"
47
48
restart: unless-stopped
48
49
```
49
50
50
51
### AppJail Director
51
-
52
52
**.env**:
53
53
54
54
```
55
+
# .env
56
+
55
57
DIRECTOR_PROJECT=code-server
56
58
PUID=1000
57
59
PGID=1000
58
60
TZ=UTC
61
+
PASSWORD=<PASSWORD>
62
+
DEFAULT_WORKSPACE=
63
+
DISABLE_MDO=
59
64
```
60
65
61
66
**appjail-director.yml**:
62
67
63
68
```yaml
69
+
# appjail-director.yml
70
+
64
71
options:
65
72
- virtualnet: ':<random> default'
66
73
- nat:
@@ -69,12 +76,16 @@ services:
69
76
name: code_server
70
77
options:
71
78
- container: 'boot args:--pull'
79
+
- expose: '8080:8080 proto:tcp'\
72
80
oci:
73
81
user: root
74
82
environment:
75
83
- PUID: !ENV '${PUID}'
76
84
- PGID: !ENV '${PGID}'
77
85
- TZ: !ENV '${TZ}'
86
+
- PASSWORD: !ENV '${PASSWORD}'
87
+
- DEFAULT_WORKSPACE: !ENV '${DEFAULT_WORKSPACE}'
88
+
- DISABLE_MDO: !ENV '${DISABLE_MDO}'
78
89
volumes:
79
90
- code-server: /config
80
91
volumes:
@@ -85,11 +96,14 @@ volumes:
85
96
**Makejail**:
86
97
87
98
```
99
+
# Makejail
100
+
88
101
ARG tag=latest
89
102
90
103
OPTION overwrite=force
91
104
OPTION from=ghcr.io/daemonless/code-server:${tag}
92
105
```
106
+
**Note**: Exposing ports in AppJail means that your service can be reached from remote hosts. If that is not your intention, do not expose the ports and communicate with the service using the IPv4 address assigned by the virtual network.
93
107
94
108
### Podman CLI
95
109
@@ -99,29 +113,57 @@ podman run -d --name code-server \
**Note**: Exposing ports in AppJail means that your service can be reached from remote hosts. If that is not your intention, do not expose the ports and communicate with the service using the IPv4 address assigned by the virtual network.
142
+
106
143
### Ansible
107
144
108
145
```yaml
109
146
- name: Deploy code-server
110
147
containers.podman.podman_container:
111
148
name: code-server
112
-
image: ghcr.io/daemonless/code-server:latest
149
+
image: "ghcr.io/daemonless/code-server:latest"
113
150
state: started
114
151
restart_policy: always
115
152
env:
116
153
PUID: "1000"
117
154
PGID: "1000"
118
155
TZ: "UTC"
156
+
PASSWORD: "<PASSWORD>"
157
+
DEFAULT_WORKSPACE: ""
158
+
DISABLE_MDO: ""
119
159
ports:
120
160
- "8080:8080"
121
161
volumes:
122
162
- "/path/to/containers/code-server:/config"
123
163
```
124
164
165
+
Access at: `http://localhost:8080`
166
+
125
167
## Parameters
126
168
127
169
### Environment Variables
@@ -131,6 +173,9 @@ podman run -d --name code-server \
131
173
| `PUID` | `1000` | User ID for the application process |
132
174
| `PGID` | `1000` | Group ID for the application process |
133
175
| `TZ` | `UTC` | Timezone for the container |
176
+
| `PASSWORD` | `<PASSWORD>` | Password for web UI (leave unset to disable auth) |
177
+
| `DEFAULT_WORKSPACE` | `` | Default folder opened in the editor (default: /config/workspace) |
178
+
| `DISABLE_MDO` | `` | Do not use FreeBSD's mac_do facility to allow executing commands as root from the terminal (optional) |
0 commit comments