diff --git a/docker-compose.yml b/docker-compose.yml index e94c20b..82ea456 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,8 @@ services: args: PY_VERSION: '3.8.13' BUILD_THEIA: 'ON' + environment: + - "ANUBIS_GIT_COMMIT=${GIT_TAG:-latest}" theia-base-39: image: registry.digitalocean.com/anubis/theia-base:python-3.9 build: @@ -17,6 +19,8 @@ services: args: PY_VERSION: '3.9.13' BUILD_THEIA: 'ON' + environment: + - "ANUBIS_GIT_COMMIT=${GIT_TAG:-latest}" theia-base-310: image: registry.digitalocean.com/anubis/theia-base:python-3.10 build: @@ -24,6 +28,8 @@ services: args: PY_VERSION: '3.10.6' BUILD_THEIA: 'ON' + environment: + - "ANUBIS_GIT_COMMIT=${GIT_TAG:-latest}" # theia-base-311: # image: registry.digitalocean.com/anubis/theia-base:python-3.11 # build: diff --git a/theia-base/Dockerfile b/theia-base/Dockerfile index 0a2f464..4f2eec3 100644 --- a/theia-base/Dockerfile +++ b/theia-base/Dockerfile @@ -3,6 +3,9 @@ ARG NODE_VERSION=18 FROM node:${NODE_VERSION}-bullseye-slim as base +ARG ANUBIS_GIT_COMMIT=latest +ENV ANUBIS_GIT_COMMIT=${ANUBIS_GIT_COMMIT} + ARG DIST=bullseye ENV TZ=America/New_York \ PUID=1001 \ @@ -128,7 +131,7 @@ RUN set -ex; \ rm -rf /var/cache/apt/*; \ rm -rf /var/lib/apt/lists/*; \ rm -rf /home/node/*; \ - find / -depth \ + find /usr /home /var -depth \ \( -name .cache -o -name __pycache__ -o -name '*.pyc' -o -name .git -o -name .github \) \ -exec 'rm' '-rf' '{}' '+'; @@ -174,7 +177,7 @@ RUN set -ex; \ rm -rf /usr/share/doc; \ rm -rf /var/lib/apt/lists/*; \ rm -rf /home/node/*; \ - find / -depth \ + find /usr /home /var -depth \ \( -name .cache -o -name __pycache__ -o -name '*.pyc' -o -name .git -o -name .github \) \ -exec 'rm' '-rf' '{}' '+'; \ fi @@ -183,6 +186,8 @@ RUN set -ex; \ RUN set -ex; \ mkdir -p /etc/anubis/skel/; \ mkdir -p /etc/anubis/init.d/; \ + mkdir -p /etc/anubis/commit/; \ + echo ${ANUBIS_GIT_COMMIT} > /etc/anubis/commit/anubis_commit.txt; \ chsh -s /usr/bin/zsh ${USER}; \ git clone https://github.com/robbyrussell/oh-my-zsh.git /opt/oh-my-zsh; \ git clone https://github.com/Aloxaf/fzf-tab.git /opt/oh-my-zsh/custom/plugins/fzf-tab; \