## Docker para COMPILACION de Gancio ## ## - Descarga codigo de Framagit.org ## - Compila la libreria Gancio ## - Dependencias: nodejs + yarn ## FROM registry.sindominio.net/debian RUN apt-get update && \ apt-get install -y --no-install-recommends curl gnupg2 ca-certificates git # Install Node Latest RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ apt-get install -y nodejs WORKDIR /opt ARG GANCIO_VERSION=master RUN echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list && \ echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && \ curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - # Install Yarn 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 WORKDIR /opt/gancio RUN yarn install && \ yarn build && \ yarn pack --filename=gancio.tgz ## Docker para EJECUCION de Gancio ## ## - Usa la libreria Gancio compilada antes ## - Instala todas las dependencias de produccion ## - Crea un link en /usr/local/bin/gancio ## - Dependencias: nodejs ## FROM registry.sindominio.net/debian RUN apt-get update && \ apt-get install -y --no-install-recommends curl gnupg2 ca-certificates git # Install Node Latest RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ apt-get install -y nodejs COPY --from=0 /opt/gancio/gancio.tgz ./ RUN tar zxf gancio.tgz && \ mv package gancio && \ rm gancio.tgz WORKDIR /gancio RUN npm install --production && \ ln -s /gancio/server/cli.js /usr/local/bin/gancio RUN useradd -u 110 -g nogroup gancio ADD entrypoint.sh / RUN chmod 750 /entrypoint.sh ENTRYPOINT [ "/bin/sh", "/entrypoint.sh" ]