code-snippets/docker/ubuntu-node/Dockerfile

30 lines
983 B
Docker
Raw Normal View History

2024-04-08 18:35:01 -04:00
FROM ubuntu:18.04
ENV DOCKER_VERSION=19.03.13
ENV NODE_VERSION=17
RUN apt-get update && \
apt-get -y install git wget bash curl sshpass jq zip unzip build-essential rpm cmake && \
git --version && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -f /var/cache/apt/archives/*.deb && \
rm -f var/cache/apt/archives/partial/*.deb && \
rm -f /var/cache/apt/*.bin
RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash && \
apt-get install -y nodejs && \
node -v && \
npm i yarn -g && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -f /var/cache/apt/archives/*.deb && \
rm -f var/cache/apt/archives/partial/*.deb && \
rm -f /var/cache/apt/*.bin
RUN wget https://download.docker.com/linux/static/edge/x86_64/docker-${DOCKER_VERSION}.tgz && \
tar xvfz docker-${DOCKER_VERSION}.tgz && \
rm docker-${DOCKER_VERSION}.tgz && \
cp ./docker/docker /usr/bin/ && \
docker -v