Skip to content

Commit 94e0b71

Browse files
committed
fix: minor Dockerfile changes to enable x11
1 parent 8432f92 commit 94e0b71

File tree

3 files changed

+42
-22
lines changed

3 files changed

+42
-22
lines changed

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
[![Neovim](https://img.shields.io/badge/Neovim%200.5+-green.svg?style=for-the-badge&logo=neovim)](https://neovim.io)
99
</div>
1010

11-
PS: For any interested readers, try to create your own configuration based on these dotfiles.
12-
13-
PS2: Some of these are related with neovim running under tmux.
14-
15-
PS3: The following is not intended to be gatekeeping how to use any of these tools. Its just a merge between a personal configuration for posterity.
11+
- PS: For any interested readers, try to create your own configuration based on these dotfiles.
12+
- PS2: Some of these are related with neovim running under tmux.
1613

1714
## Editors
1815

recipes/anki/Dockerfile

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,35 @@ COPY ./requirements.txt .
66
ENV USER="myapp"
77
WORKDIR "/home/${USER}/app"
88

9-
#RUN addgroup -g 1000 -S "${USER}" && \
10-
# adduser -s /bin/sh -u 1000 -G "${USER}" \
11-
# -h "/home/${USER}" -D "${USER}" && && \
12-
# su "${USER}"
13-
14-
#RUN apk upgrade && apk update && \
15-
# apk add python3 py3-pip
9+
RUN <<EOF
1610

17-
#USER "${USER}"
11+
#set -e
1812

13+
# install basic tools
14+
apk upgrade && apk update && \
15+
apk add python3 py3-pip zstd xdg-utils \
16+
nsxiv libx11 imlib2 libxft musl libexif fontconfig
1917

20-
RUN <<EOF
21-
set -e
2218

2319
addgroup -g 1000 -S "${USER}" && \
2420
adduser -s /bin/sh -u 1000 -G "${USER}" \
2521
-h "/home/${USER}" -D "${USER}" && \
26-
su "${USER}" && \
22+
su "${USER}" && cd || return && \
2723
pip3 install --user --upgrade pip virtualenv --break-system-packages && \
2824
export PATH=$HOME/.local/bin/:$PATH && \
2925
virtualenv venv && source ./venv/bin/activate && \
3026
python3 -m ensurepip --default-pip && \
31-
pip3 install --no-cache-dir -r ./requirements.txt && \
3227

28+
# get the release, decompress with zst, tar, and attempt to install.
29+
wget https://github.com/ankitects/anki/releases/download/25.02rc1/anki-25.02-linux-qt6.tar.zst
30+
zstd -d ./anki-25.02-linux-qt6.tar.zst
31+
tar -xvf anki-25.02-linux-qt6.tar
32+
cd ./anki-25.02-linux-qt6 || return
33+
. ./install.sh
34+
35+
#pip3 install --no-cache-dir -r ./requirements.txt && \
36+
37+
# always
3338
deactivate
3439

3540
EOF

scripts/setvpn.sh

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
#v0.1.0
44

5+
install_bin() {
6+
if [ -f ./scripts/setvpn.sh ] && [ -f /usr/bin/setvpn ]; then
7+
if sudo cp ./scripts/setvpn.sh /usr/bin/setvpn; then
8+
printf "\n|> setvpn installed with success.\n "
9+
else
10+
printf "\n|> It was not possible to install setvpn. :0\n"
11+
printf "Error: %s\n" $?
12+
fi
13+
14+
else
15+
echo ue
16+
fi
17+
}
18+
519
setvpn_ver() {
620
printf "\nsetvpn v0.1.0 [fev 07 2025].\n"
721
}
@@ -154,11 +168,14 @@ USAGE: setvpn [-options]
154168
- shutwarp
155169
- help
156170
- version
171+
- install
157172
eg,
158-
setvpn open # open connection based on the built-in configuration file
159-
setvpn close # close connection if it already exists
160-
setvpn setwarp host_alias # creates the VPN tunnel around a SSH connection to the host_alias
161-
setvpn shutwarp # closes the connection
173+
setvpn -open # open connection based on the built-in configuration file
174+
setvpn -close # close connection if it already exists
175+
setvpn -setwarp host_alias # creates the VPN tunnel around a SSH connection to the host_alias
176+
setvpn -shut # closes the connection
177+
setvpn -i # install setvpn
178+
162179
See the man page and example file for more info.
163180
164181
END
@@ -188,7 +205,8 @@ elif [ "$1" = "help" ] || [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
188205
print_usage
189206
elif [ "$1" = "version" ] || [ "$1" = "--version" ] || [ "$1" = "-v" ]; then
190207
setvpn_ver
191-
208+
elif [ "$1" = "-i" ] || [ "$1" = "--install" ]; then
209+
install_bin
192210
else
193211
printf "\nInvalid function name. Please specify one of the following:\n"
194212
print_usage

0 commit comments

Comments
 (0)