synapse-admin-docker/Dockerfile

41 lines
1.1 KiB
Docker

FROM node:lts-alpine as builder
ARG BASE_URL=/_a/
ARG REACT_APP_SERVER
WORKDIR /app
COPY synapse-admin/.yarn /app/.yarn
COPY synapse-admin/yarn.lock synapse-admin/package.json synapse-admin/.yarnrc.yml /app/
RUN set -x && \
apk add --no-cache jq bash && \
yarn config set enableTelemetry 0 && \
yarn install
#COPY config.json /app/src/platform/web/assets/config.json
COPY ./synapse-admin /app
# The upstream file wants to use git to read the version on build time
# So it has to be copied after 'synapse-admin' dir is copied
COPY vite.config.ts /app/vite.config.ts
COPY build.sh /app/build.sh
RUN set -x && \
ls /app && \
/app/build.sh
FROM alpine:latest as packager
# The generated html/js/css files are in /app/dist
COPY --from=builder /app/dist /app/dist
# Version is read from package.json
COPY --from=builder /app/package.json /app/package.json
RUN set -x && \
apk add --no-cache git python3 build-base ruby ruby-dev ruby-etc jq bash tar && \
gem install fpm
COPY deb/make_deb.sh deb/after-install.sh /deb/
WORKDIR /deb/target
RUN set -x && \
tree /app && \
/deb/make_deb.sh