🗃️ Committing everything that changed 🗃️

This commit is contained in:
casjay 2022-10-17 11:28:57 -04:00
parent 792bcd35b5
commit 436a94f6da
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F
6 changed files with 14 additions and 15 deletions

View File

@ -13,11 +13,11 @@ ENV LANG=en_US.utf8 \
DEBIAN_FRONTEND="noninteractive" \ DEBIAN_FRONTEND="noninteractive" \
TOR_BROWSER_VERSION="11.5.4" TOR_BROWSER_VERSION="11.5.4"
COPY ./bin/. /usr/local/bin/ COPY ./rootfs/. /
COPY ./config/. ${DEFAULT_CONF_DIR}/
COPY ./data/. ${DEFAULT_DATA_DIR}/
RUN set -ex; rm -Rf "/etc/apt/sources.list" ; mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_CONF_DIR}" "${DEFAULT_TEMPLATE_DIR}" "/etc/sudoers.d" "/tmp/tor-profile"; \ RUN set -ex; \
rm -Rf "/etc/apt/sources.list" ; \
mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_CONF_DIR}" "${DEFAULT_TEMPLATE_DIR}" "/etc/sudoers.d" "/tmp/tor-profile"; \
echo 'export DEBIAN_FRONTEND="noninteractive"' >"/etc/profile.d/apt.sh" && chmod 755 "/etc/profile.d/apt.sh" && \ echo 'export DEBIAN_FRONTEND="noninteractive"' >"/etc/profile.d/apt.sh" && chmod 755 "/etc/profile.d/apt.sh" && \
echo "deb http://deb.debian.org/debian ${DEBIAN_VERSION} main contrib non-free" >>"/etc/apt/sources.list" ; \ echo "deb http://deb.debian.org/debian ${DEBIAN_VERSION} main contrib non-free" >>"/etc/apt/sources.list" ; \
echo "deb http://deb.debian.org/debian ${DEBIAN_VERSION}-updates main contrib non-free" >>"/etc/apt/sources.list" ; \ echo "deb http://deb.debian.org/debian ${DEBIAN_VERSION}-updates main contrib non-free" >>"/etc/apt/sources.list" ; \
@ -39,16 +39,17 @@ RUN set -ex; rm -Rf "/etc/apt/sources.list" ; mkdir -p "${DEFAULT_DATA_DIR}"
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg && \ wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg && \
install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg && \ install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg && \
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" >"/etc/apt/sources.list.d/vscode.list" && \ echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" >"/etc/apt/sources.list.d/vscode.list" && \
apt-get update -yy && apt-get upgrade -yy && apt-get install -yy code -yy && \ apt-get update -yy && apt-get upgrade -yy && apt-get install -yy code -yy
useradd --shell /bin/bash --create-home --home-dir /home/x11user x11user && \
RUN useradd --shell /bin/bash --create-home --home-dir /home/x11user x11user && \
usermod -a -G audio,video,sudo,tty,dialout,cdrom,floppy,audio,dip,video,plugdev x11user && \ usermod -a -G audio,video,sudo,tty,dialout,cdrom,floppy,audio,dip,video,plugdev x11user && \
echo "x11user ALL=(ALL) NOPASSWD: ALL" >"/etc/sudoers.d/x11user" && \ echo "x11user ALL=(ALL) NOPASSWD: ALL" >"/etc/sudoers.d/x11user"
apt-get clean
RUN sudo -u x11user setup-code.sh && \ RUN sudo -u x11user setup-code.sh && \
chown -Rf x11user:x11user "/home/x11user" chown -Rf x11user:x11user "/home/x11user"
RUN echo 'Running cleanup' ; \ RUN echo 'Running cleanup' ; \
apt-get clean && \
update-alternatives --install /bin/sh sh /bin/bash 1 ; \ update-alternatives --install /bin/sh sh /bin/bash 1 ; \
rm -Rf /usr/share/doc/* /usr/share/info/* packages.microsoft.gpg ; \ rm -Rf /usr/share/doc/* /usr/share/info/* packages.microsoft.gpg ; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ; \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ; \
@ -111,11 +112,10 @@ ENV LANG=en_US.utf8 \
USER x11user USER x11user
WORKDIR /home/x11user WORKDIR /home/x11user
VOLUME [ "/data", "/tmp/.X11-unix", "${HOME}/.Xauthority", ] VOLUME [ "/config", "/data", "/tmp/.X11-unix", "$HOME/.Xauthority", ]
EXPOSE $EXPOSE_PORTS EXPOSE $EXPOSE_PORTS
CMD [ "$@" ] CMD [ "$@" ]
ENTRYPOINT [ "tini", "-p", "SIGTERM", "--", "/usr/local/bin/entrypoint-code.sh" ] ENTRYPOINT [ "tini", "-p", "SIGTERM", "--", "/usr/local/bin/entrypoint-code.sh" ]
HEALTHCHECK --start-period=1m --interval=2m --timeout=3s CMD [ "/usr/local/bin/entrypoint-code.sh", "healthcheck" ] HEALTHCHECK --start-period=1m --interval=2m --timeout=3s CMD [ "/usr/local/bin/entrypoint-code.sh", "healthcheck" ]

View File

View File

View File

@ -100,7 +100,7 @@ export SSL_CONTAINER_DIR SSL_CERT_BOT DISPLAY
[ -f "/config/.env.sh" ] && . "/config/.env.sh" [ -f "/config/.env.sh" ] && . "/config/.env.sh"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set timezone # Set timezone
[ -n "${TZ}" ] && echo "${TZ}" | sudo tee "/etc/timezone" >/dev/null >/dev/null [ -n "${TZ}" ] && echo "${TZ}" | sudo tee "/etc/timezone" >/dev/null
[ -f "/usr/share/zoneinfo/${TZ}" ] && sudo ln -sf "/usr/share/zoneinfo/${TZ}" "/etc/localtime" [ -f "/usr/share/zoneinfo/${TZ}" ] && sudo ln -sf "/usr/share/zoneinfo/${TZ}" "/etc/localtime"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set hostname # Set hostname
@ -130,8 +130,8 @@ if [ -d "/config/code" ]; then
else else
mv -fv "$HOME/.config/Code" "/config/code" && ln -sf "/config/code" "$HOME/.config/Code" mv -fv "$HOME/.config/Code" "/config/code" && ln -sf "/config/code" "$HOME/.config/Code"
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Fic permissions # Fix permissions
sudo chown -Rf x11user:x11user "/data" "/config" sudo chown -Rf x11user:x11user "/data" "/config"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case "$1" in case "$1" in
@ -144,7 +144,7 @@ case "$1" in
;; ;;
healthcheck) # Docker healthcheck healthcheck) # Docker healthcheck
__heath_check || exitCode=10 __heath_check "code" || exitCode=10
exit ${exitCode:-$?} exit ${exitCode:-$?}
;; ;;

View File

@ -97,4 +97,3 @@ code --install-extension "yinfei.luahelper" --force
code --install-extension "yzhang.markdown-all-in-one" --force code --install-extension "yzhang.markdown-all-in-one" --force
code --install-extension "ZainChen.json" --force code --install-extension "ZainChen.json" --force
curl -q -LSsf "https://github.com/casjay/vs-code/raw/main/settings-linux.json" -o "$HOME/.config/Code/User/settings.json" curl -q -LSsf "https://github.com/casjay/vs-code/raw/main/settings-linux.json" -o "$HOME/.config/Code/User/settings.json"