Files
docker-node-and-go/Dockerfile
Jean-Luc Makiola 31567e0c56
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
Initial commit: Dockerfile with Go and Node.js + Gitea Actions workflow
2026-02-23 19:04:55 +01:00

28 lines
951 B
Docker

FROM debian:bookworm-slim
ARG GO_VERSION=1.24.0
ARG NODE_MAJOR=22
ENV PATH="/usr/local/go/bin:${PATH}"
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
wget \
&& rm -rf /var/lib/apt/lists/*
# Install Go
RUN wget -q "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" -O /tmp/go.tar.gz \
&& tar -C /usr/local -xzf /tmp/go.tar.gz \
&& rm /tmp/go.tar.gz
# Install Node.js via NodeSource
RUN curl -fsSL "https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key" \
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" \
> /etc/apt/sources.list.d/nodesource.list \
&& apt-get update && apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
RUN go version && node --version && npm --version