commit 45cc227e531017a242fc41a4c0a66399058c5f19 Author: holzi1005 Date: Fri Nov 15 08:15:40 2024 +0100 Add swarm_visualizer_dockerfile diff --git a/swarm_visualizer_dockerfile b/swarm_visualizer_dockerfile new file mode 100644 index 0000000..6adf308 --- /dev/null +++ b/swarm_visualizer_dockerfile @@ -0,0 +1,26 @@ +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 + +RUN npm install --only=prod + +CMD ["npm", "start"] \ No newline at end of file