36 lines
1.1 KiB
Docker
36 lines
1.1 KiB
Docker
# Use an official Node.js runtime as the base image
|
|
FROM node:bullseye
|
|
|
|
RUN apt update && apt -y dist-upgrade
|
|
RUN apt install dirmngr
|
|
|
|
RUN echo "deb http://ppa.launchpad.net/nextcloud-devs/client/ubuntu zesty main" >> /etc/apt/sources.list.d/nextcloud-client.list
|
|
RUN echo "deb-src http://ppa.launchpad.net/nextcloud-devs/client/ubuntu zesty main" >> /etc/apt/sources.list.d/nextcloud-client.list
|
|
|
|
RUN apt-key adv --recv-key --keyserver keyserver.ubuntu.com AD3DD469
|
|
|
|
RUN apt update -y
|
|
|
|
RUN apt install --assume-yes nextcloud-desktop-cmd
|
|
|
|
RUN apt install ldap-utils
|
|
|
|
RUN apt autoremove && apt clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set the working directory inside the container
|
|
WORKDIR /usr/src/app
|
|
|
|
# Copy app
|
|
COPY backend/utils/nextcloud-migration/src/** ./src/
|
|
COPY backend/utils/nextcloud-migration/.nvmrc ./
|
|
COPY backend/utils/nextcloud-migration/*.json ./
|
|
COPY backend/utils/nextcloud-migration/rollup.config.js ./
|
|
|
|
RUN npm i && npm run build && npm cache clean --force && rm -rf node_modules
|
|
|
|
# Don't rebuild on start
|
|
RUN perl -i -ne 'print unless/prestart/' package.json
|
|
|
|
# Run the Node.js application
|
|
CMD ["npm", "run", "start"]
|