Skip to content

Commit

Permalink
fix: release-trigger: use slim base image (#5611)
Browse files Browse the repository at this point in the history
See also b/382229925
  • Loading branch information
burkedavison authored Dec 4, 2024
1 parent f66cf62 commit f3fbbab
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/release-trigger/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# Use a multi-stage docker build to limit production dependencies.

FROM node:18.20.5-bullseye AS BASE
FROM node:18.20.5-bullseye-slim AS BASE

# Install pyenv dependencies
RUN apt-get update && \
Expand All @@ -23,10 +23,15 @@ RUN apt-get update && \
xz-utils tk-dev libffi-dev liblzma-dev python3-openssl && \
apt-get upgrade -y

# Remove base python3 installation, as we install our own version.
RUN rm -r /usr/bin/python3

USER node

# Install pyenv
RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \
RUN curl -L -o /tmp/pyenv.tar.gz https://github.com/pyenv/pyenv/archive/refs/tags/v2.4.20.tar.gz && \
mkdir ~/.pyenv && \
tar -xzvf /tmp/pyenv.tar.gz -C ~/.pyenv --strip-components=1 && \
echo 'export PATH="/home/node/.pyenv/bin:$PATH"' >> ~/.profile && \
echo 'export PATH="/home/node/.pyenv/shims:$PATH"' >> ~/.profile && \
echo 'eval "$(pyenv init -)"' >> ~/.profile && \
Expand Down

0 comments on commit f3fbbab

Please sign in to comment.