Add Dockerfile for Ubuntu 24.04 with essential tools and Node.js setup

This commit is contained in:
2025-12-08 17:51:23 +01:00
parent 9193eca12f
commit 6edb306d95

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM ubuntu:24.04
LABEL maintainer="thommyho"
LABEL description="An Ubuntu 24.04 image with essential tools for git development and CI/CD pipelines."
RUN apt-get update && apt-get install -y \
git \
curl \
wget \
build-essential \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# nvm environment variables
RUN mkdir -p /usr/local/nvm
ENV NVM_DIR=/usr/local/nvm
ENV NODE_VERSION=24.11.1
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
RUN . $NVM_DIR/nvm.sh && \
nvm install $NODE_VERSION && \
nvm use $NODE_VERSION && \
nvm alias default $NODE_VERSION
# add node and npm to path so the commands are available
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
# RUN node -v && npm -v