salix/back/Dockerfile

62 lines
1.7 KiB
Docker

FROM node:20-bullseye as base
ENV TZ Europe/Madrid
ARG DEBIAN_FRONTEND=noninteractive
# Puppeteer
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gnupg2 \
graphicsmagick \
libfontconfig lftp xvfb gconf-service libasound2 libatk1.0-0 libc6 \
libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 \
libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 \
libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 \
libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 \
libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
# Extra dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
samba-common-bin samba-dsdb-modules\
&& rm -rf /var/lib/apt/lists/*
RUN npm i -g gulp-cli
# RUN npm i -g bun
# RUN apt update && apt install -y chromium-browser chromium-chromedriver
# RUN curl -fsSL https://bun.sh/install | bash
WORKDIR /salix
COPY print/package.json print/package-lock.json print/
COPY loopback/package.json loopback/
COPY package.json package-lock.json ./
COPY gulpfile.js ./
COPY \
LICENSE \
README.md \
./
# RUN bun --prefix ./print install ./print
FROM base AS local
WORKDIR /salix
RUN cd ./print && npx puppeteer browsers install chrome
CMD ["npx", "gulp", "backWatch"]
FROM base AS test
WORKDIR /salix
RUN cd ./print && npx puppeteer browsers install chrome
COPY loopback loopback
RUN npm i
COPY back back
COPY modules modules
COPY print print
COPY storage storage
# CMD ["npx", "gulp", "backOnly"]
# CMD ["node", "back/tests.js", "ci"]