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.
docker-gancio/Dockerfile

66 lines
1.7 KiB

## Docker para COMPILACION de Gancio
##
## - Descarga codigo de Framagit.org
## - Compila la libreria Gancio
## - Dependencias: nodejs + yarn
##
FROM registry.sindominio.net/debian
2 years ago
RUN apt-get update && \
apt-get install -y --no-install-recommends curl gnupg2 ca-certificates git \
postgresql-server-dev-all build-essential
2 years ago
# 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
RUN ./node_modules/.bin/sequelize db:migrate
RUN yarn build
RUN 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