Skip to content

Commit 3bca2f0

Browse files
authored
Merge pull request #433 from linuxserver/code-server-zsh-s6v3
switch to hybrid (code-server-zsh)
2 parents f69c83c + d38f9ea commit 3bca2f0

File tree

8 files changed

+31
-6
lines changed

8 files changed

+31
-6
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM lsiobase/alpine:3.12 as buildstage
1+
FROM lsiobase/alpine:3.15 as buildstage
22

33
RUN \
4-
apk add --no-cache \
4+
apk add --no-cache \
55
git && \
6-
git clone https://github.com/ohmyzsh/ohmyzsh.git /root-layer/.oh-my-zsh
6+
git clone https://github.com/ohmyzsh/ohmyzsh.git /root-layer/.oh-my-zsh
77

88
COPY root/ /root-layer/
99

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Zsh / Oh My Zsh - Docker mod for code-server
1+
# Zsh / Oh My Zsh - Docker mod for code-server/openvscode-server
22

3-
This mod adds `zsh` and `Oh My Zsh` to code-server, to be installed/updated during container start.
3+
This mod adds `zsh` and `Oh My Zsh` to code-server/openvscode-server, to be installed/updated during container start.
44

5-
In code-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:code-server-zsh`
5+
In code-server/openvscode-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:code-server-zsh`
66

77
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:code-server-zsh|linuxserver/mods:code-server-prolog`
88

root/etc/s6-overlay/s6-rc.d/init-mod-code-server-zsh-add-package/dependencies.d/init-mods

Whitespace-only changes.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
if ! dpkg -s zsh >/dev/null 2>&1; then
4+
echo "**** Adding zsh to package install list ****"
5+
echo "zsh" >> /mod-repo-packages-to-install.list
6+
else
7+
echo "**** zsh already installed, skipping ****"
8+
fi
9+
10+
# Install oh-my-zsh if not installed already
11+
if [ -d /config/.oh-my-zsh ]; then
12+
echo "**** Oh My Zsh is already installed. You can update it via \"omz update\" in terminal. ****"
13+
elif [ -d /.oh-my-zsh ]; then
14+
echo "**** Installing Oh My Zsh. You can update it via \"omz update\" in terminal. ****"
15+
mv /.oh-my-zsh /config/.oh-my-zsh
16+
cp /config/.oh-my-zsh/templates/zshrc.zsh-template /config/.zshrc
17+
else
18+
echo "**** It looks like Oh My Zsh was manually deleted after install. Please recreate the code-server container to reinstall Oh My Zsh. ****"
19+
fi
20+
21+
chown -R abc:abc \
22+
/config/.oh-my-zsh \
23+
/config/.zshrc
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
oneshot
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/etc/s6-overlay/s6-rc.d/init-mod-code-server-zsh-add-package/run

root/etc/s6-overlay/s6-rc.d/init-mods-package-install/dependencies.d/init-mod-code-server-zsh-add-package

Whitespace-only changes.

root/etc/s6-overlay/s6-rc.d/user/contents.d/init-mod-code-server-zsh-add-package

Whitespace-only changes.

0 commit comments

Comments
 (0)