Skip to content

Commit

Permalink
Configure devcontainer slackbot container to respect .tool-versions c…
Browse files Browse the repository at this point in the history
…onfigurations
  • Loading branch information
hakatashi committed Nov 26, 2024
1 parent f9fb58b commit 2f6c776
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .devcontainer/slackbot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
FROM node:20-bookworm
FROM debian:bookworm-slim

RUN apt-get update -y && \
# Install build dependencies for node-canvas
# https://github.com/Automattic/node-canvas/wiki/Installation%3A-Ubuntu-and-other-Debian-based-systems
apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev -y && \
# Install other dependencies
apt-get install git bash gnupg -y && \
apt-get install git curl bash gnupg -y && \
# Setup asdf
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1 && \
echo ". $HOME/.asdf/asdf.sh" >> ~/.bashrc && \
echo ". $HOME/.asdf/completions/asdf.bash" >> ~/.bashrc && \
echo "export ASDF_DIR=\"$HOME/.asdf\"" >> ~/.profile && \
echo ". \"$HOME/.asdf/asdf.sh\"" >> ~/.profile && \
. ~/.profile && \
# Install asdf plugins
asdf plugin add nodejs && \
asdf plugin add rust && \
# Install ngrok
curl -sSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc | tee /etc/apt/trusted.gpg.d/ngrok.asc > /dev/null && \
echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | tee /etc/apt/sources.list.d/ngrok.list && \
Expand All @@ -15,11 +25,12 @@ RUN apt-get update -y && \
# https://source.chromium.org/chromium/chromium/src/+/main:chrome/installer/linux/debian/dist_package_versions.json;l=39-75;drc=df14ef63b2bc818472205e50ad32a3511db4edb2
curl -sSL https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/googlechrome-linux-keyring.gpg && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/googlechrome-linux-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" | tee /etc/apt/sources.list.d/google.list && \
apt-get update && \
apt-get update -y && \
apt-get install google-chrome-stable fonts-ipafont-gothic libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libdrm2 libexpat1 libgbm1 libglib2.0-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libudev1 libuuid1 libx11-6 libx11-xcb1 libxcb-dri3-0 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxkbcommon0 libxrandr2 libxrender1 libxshmfence1 libxss1 libxtst6 -y && \
# Install slackbot npm dependencies
git clone https://github.com/tsg-ut/slackbot.git --branch master --single-branch --recursive --depth 1 /code && \
git clone https://github.com/tsg-ut/slackbot.git --branch asdf --single-branch --recursive --depth 1 /code && \
cd /code && \
asdf install && \
npm install && \
# Cleanup
apt-get clean && \
Expand Down

0 comments on commit 2f6c776

Please sign in to comment.