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.

75 lines
1.6 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 npm
WORKDIR /
ARG GANCIO_VERSION=master
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
COPY pubkey.gpg .
RUN cat pubkey.gpg | apt-key add -
RUN apt-get update && \
apt-get install -y --no-install-recommends yarn
RUN git clone https://framagit.org/les/gancio.git && \
cd gancio && \
git checkout $GANCIO_VERSION
8 months ago
# TODO: Check Sign
WORKDIR /gancio
RUN yarn install && \
yarn build && \
yarn pack --filename=gancio.tgz
RUN apt-get install -y --no-install-recomends golang
WORKDIR /
COPY installer .
WORKDIR /installer
RUN go get . && \
go build -o gancio-installer
8 months ago
# --- #
FROM registry.sindominio.net/debian
RUN apt-get update && \
apt-get install -y --no-install-recommends curl gnupg2 ca-certificates git npm
COPY --from=builder /gancio/gancio.tgz ./
RUN tar zxf gancio.tgz && \
mv package gancio && \
rm gancio.tgz
WORKDIR /gancio
# Instalar solo las dependencias de produccion y crear symlink para ejecucion
RUN npm install --production && \
ln -s /gancio/server/cli.js /usr/bin/gancio
COPY --from=builder /installer/gancio-installer /usr/bin/gancio-installer
ADD entrypoint.sh /
RUN chmod 755 /entrypoint.sh
# Preconfig
RUN mkdir /data
COPY config.json /gancio/config.json.example
VOLUME ["/data"]
ENTRYPOINT [ "/bin/sh", "/entrypoint.sh" ]