2019-08-03 18:45:06 -06:00
|
|
|
# Stage 0: Build the thing
|
2021-11-21 12:34:56 +00:00
|
|
|
# Need debian based image to make node happy
|
|
|
|
FROM node:16 AS builder
|
2019-08-03 18:45:06 -06:00
|
|
|
|
|
|
|
COPY . /src
|
|
|
|
WORKDIR /src
|
|
|
|
|
2021-11-21 12:34:56 +00:00
|
|
|
RUN apk add rustup
|
|
|
|
RUN rustup-init -y --target x86_64-unknown-linux-gnu
|
|
|
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
|
|
|
|
|
|
|
2020-12-13 13:35:10 +00:00
|
|
|
# will also build
|
2021-11-21 12:34:56 +00:00
|
|
|
RUN yarn
|
2019-08-03 18:45:06 -06:00
|
|
|
|
|
|
|
# Stage 1: The actual container
|
2021-09-17 13:19:25 +01:00
|
|
|
FROM node:16-alpine
|
2019-08-03 18:45:06 -06:00
|
|
|
|
2019-08-07 21:29:04 +01:00
|
|
|
COPY --from=builder /src/lib/ /bin/matrix-github/
|
2021-04-11 18:39:26 +01:00
|
|
|
COPY --from=builder /src/public/ /bin/matrix-github/public/
|
|
|
|
COPY --from=builder /src/package.json /bin/matrix-github/
|
|
|
|
COPY --from=builder /src/yarn.lock /bin/matrix-github/
|
2019-08-03 18:45:06 -06:00
|
|
|
WORKDIR /bin/matrix-github
|
2020-12-13 13:35:10 +00:00
|
|
|
RUN yarn --production
|
2019-08-03 18:45:06 -06:00
|
|
|
|
|
|
|
VOLUME /data
|
|
|
|
EXPOSE 9993
|
|
|
|
EXPOSE 7775
|
|
|
|
|
2019-08-09 22:44:27 -06:00
|
|
|
CMD ["node", "/bin/matrix-github/App/BridgeApp.js", "/data/config.yml", "/data/registration.yml"]
|