Adaptación del Docker publicado en https://git.sindominio.net/gancio/docker-gancio para su uso en Estibadores
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

76 lines
2.0 KiB

## ARGUMENTOS:
## GANCIO_VERSION tag/rama desde la que se construye gancio (defecto: master)
FROM registry.sindominio.net/debian as builder
RUN apt-get update && \
apt-get install -y --no-install-recommends curl gnupg2 ca-certificates git jq npm
WORKDIR /
ARG GANCIO_VERSION=master
ARG GITLAB_PROJECT=48668
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
COPY pubkey.gpg /usr/local/share/keyrings/yarn.gpg
RUN gpg --no-default-keyring --keyring ./yarn_keyring.gpg --import /usr/local/share/keyrings/yarn.gpg && \
gpg --no-default-keyring --keyring ./yarn_keyring.gpg --export > ./yarn-archive-keyring.gpg && \
mv ./yarn-archive-keyring.gpg /etc/apt/trusted.gpg.d/
RUN apt-get update && \
apt-get install -y --no-install-recommends yarn
RUN COMMIT=`git ls-remote --tags https://framagit.org/les/gancio.git | tail -n1 | cut -f1` && \
VERIFIED=`curl https://framagit.org/api/v4/projects/$GITLAB_PROJECT/repository/commits/$COMMIT/signature | jq '.verification_status'` && \
[ $VERIFIED="verified" ] || exit 1 && \
git clone https://framagit.org/les/gancio.git && \
cd gancio && \
git checkout -b $COMMIT
WORKDIR /gancio
RUN yarn install && \
yarn build && \
yarn pack --filename=gancio.tgz
RUN tar xzf gancio.tgz && \
mv package /tmp/gancio
RUN apt-get install -y --no-install-recommends golang
WORKDIR /tmp/installer
COPY installer .
RUN go build -o gancio-installer
FROM registry.sindominio.net/debian
ENV TZ=Europe/Madrid
RUN apt-get update && \
apt-get install -y --no-install-recommends npm
COPY --from=builder /tmp/gancio ./gancio
WORKDIR /gancio
RUN npm install --production && \
ln -s /gancio/server/cli.js /usr/bin/gancio
COPY --from=builder /tmp/installer /usr/share/local/gancio-installer
RUN cp /usr/share/local/gancio-installer/gancio-installer /usr/bin/gancio-installer
ADD entrypoint.sh /
RUN chmod 755 /entrypoint.sh
RUN mkdir /data
VOLUME ["/data"]
ENTRYPOINT [ "/bin/sh", "/entrypoint.sh" ]
CMD ["start", "--config", "/data/config.json"]