-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.debian
24 lines (22 loc) · 1.05 KB
/
Dockerfile.debian
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ARG DEBIAN_VERSION=bullseye
FROM docker.io/tiredofit/debian:${DEBIAN_VERSION}
LABEL maintainer="Dave Conroy (github.com/tiredofit)"
ARG NODE_VERSION
ENV NODE_VERSION=${NODE_VERSION:-18}
### Add users
RUN set -x && \
adduser --home /app --gecos "Node User" --disabled-password nodejs && \
\
curl -sSLk https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
echo "deb https://deb.nodesource.com/node_${NODE_VERSION}.x $(cat /etc/os-release |grep "VERSION=" | awk 'NR>1{print $1}' RS='(' FS=')') main" > /etc/apt/sources.list.d/nodesource.list && \
echo "deb-src https://deb.nodesource.com/node_${NODE_VERSION}.x $(cat /etc/os-release |grep "VERSION=" | awk 'NR>1{print $1}' RS='(' FS=')') main" >> /etc/apt/sources.list.d/nodesource.list && \
apt-get update && \
apt-get upgrade -y && \
apt-get install --no-install-recommends -y \
nodejs \
yarn \
&& \
\
apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*