Public-Dockerfiles/swarm_visualizer_dockerfile

28 lines
755 B
Text
Raw Normal View History

2024-11-15 08:15:40 +01:00
FROM node:23-alpine3.20
ENV DOCKERVERSION=27.3.1
WORKDIR /usr/src/app
RUN apk --no-cache add \
curl \
unzip \
&& rm -rf /var/cache/apk/*
# https://stackoverflow.com/a/43594065
RUN curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKERVERSION}.tgz \
&& tar xzvf docker-${DOCKERVERSION}.tgz --strip 1 -C /usr/local/bin docker/docker \
&& rm docker-${DOCKERVERSION}.tgz
RUN wget https://github.com/yandeu/docker-swarm-visualizer/archive/refs/heads/main.zip -O artifact.zip \
&& unzip artifact.zip -d / \
&& rm artifact.zip
RUN mv /docker-swarm-visualizer-main/package*.json /usr/src/app/ \
&& rm -r /docker-swarm-visualizer-main
2024-11-15 08:37:14 +01:00
USER nobody
2024-11-15 08:15:40 +01:00
RUN npm install --only=prod
CMD ["npm", "start"]