-
Notifications
You must be signed in to change notification settings - Fork 140
/
Dockerfile.cli.node
38 lines (33 loc) · 1.63 KB
/
Dockerfile.cli.node
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#syntax=docker/dockerfile-upstream:1
# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.*.blueprint)
ARG REPO="thecodingmachine/php"
ARG TAG_PREFIX=""
ARG FROM_IMAGE="${REPO}:${TAG_PREFIX}:${PHP_VERSION}-${GLOBAL_VERSION}-cli"
FROM $FROM_IMAGE
LABEL authors="Julien Neuhart <[email protected]>, David Négrier <[email protected]>"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG TARGETOS
ARG TARGETARCH
ARG BLACKFIRE_VERSION=1
ARG NODE_VERSION=16
USER root
ENV BLACKFIRE_VERSION=${BLACKFIRE_VERSION}
RUN apt-get update && \
apt-get install -y --no-install-recommends gnupg && \
if [[ "${NODE_VERSION}" -lt "16" ]]; then \
curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo bash -; \
else \
sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list; \
fi && \
apt-get update && \
apt-get install -y --no-install-recommends nodejs && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
apt-get install -y --no-install-recommends yarn && \
if [[ "${NODE_VERSION}" == "10" ]]; then npm install -g npm@^6.14; fi && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
USER docker