new Dockerfile image and docker-compose

This commit is contained in:
lesion
2022-06-22 17:53:05 +02:00
parent 5d4626ee5e
commit e4e1dd2c6e
6 changed files with 22 additions and 28 deletions

View File

@@ -1,8 +1,18 @@
FROM node:17-slim
RUN bash -c "apt update -y && apt install git -y && apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp"
RUN yarn global remove gancio || true
RUN yarn cache clean
RUN yarn global add --latest --production --silent https://gancio.org/latest.tgz
ADD entrypoint.sh /
RUN chmod 755 /entrypoint.sh
ENTRYPOINT [ "/bin/sh", "/entrypoint.sh" ]
FROM debian:stable-slim AS nodejs-base
RUN apt-get -q update && \
env DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs && \
apt-get clean && rm -fr /var/lib/apt/lists/*
FROM nodejs-base AS build
RUN apt-get -q update && \
env DEBIAN_FRONTEND=noninteractive apt-get -y install git yarnpkg && \
yarnpkg global add --latest --production --silent http://192.168.10.159:8080/l.tgz && \
apt-get clean && rm -fr /var/lib/apt/lists/*
FROM nodejs-base
COPY --from=build /usr/local/share/.config/yarn/ /usr/local/share/.config/yarn/
RUN ln -s ../share/.config/yarn/global/node_modules/.bin/gancio /usr/local/bin/gancio
ENTRYPOINT ["/usr/local/bin/gancio"]