Skip to content

Commit

Permalink
✨ Add slim debian variant
Browse files Browse the repository at this point in the history
Closing #15
  • Loading branch information
nikolaik committed Oct 17, 2020
1 parent 10dc7fe commit 96425ac
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
DOCKER_IMAGE_NAME = "nikolaik/python-nodejs"
VERSIONS_PATH = Path("versions.json")
DEFAULT_DISTRO = "buster"
DISTROS = ["buster", "stretch", "alpine"]
DEFAULT_DISTROS = ["buster", "stretch", "alpine"]
DISTROS = ["buster", "slim", "stretch", "alpine"]
DEFAULT_DISTROS = ["buster", "slim", "stretch", "alpine"]

todays_date = datetime.utcnow().date().isoformat()

Expand Down
21 changes: 21 additions & 0 deletions template-slim.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated %%NOW%%
# python: %%PYTHON_CANONICAL%%
# nodejs: %%NODEJS_CANONICAL%%
FROM python:%%PYTHON_IMAGE%%
MAINTAINER Nikolai R Kristiansen <nikolaik@gmail.com>

# Install node prereqs, nodejs and yarn
# Ref: https://deb.nodesource.com/setup_%%NODEJS%%.x
# Ref: https://yarnpkg.com/en/docs/install
RUN \
echo "deb https://deb.nodesource.com/node_%%NODEJS%%.x buster main" > /etc/apt/sources.list.d/nodesource.list && \
wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && \
wget -qO- https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
apt-get update && \
apt-get install -yqq nodejs=$(apt-cache show nodejs|grep Version|grep nodesource|cut -c 10-) yarn && \
apt-mark hold nodejs && \
pip install -U pip && pip install pipenv && \
npm i -g npm@^%%NPM_VERSION%% && \
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python && ln -s /root/.poetry/bin/poetry /usr/local/bin && \
rm -rf /var/lib/apt/lists/*

0 comments on commit 96425ac

Please sign in to comment.