2020-02-07 07:04:18 +04:00
|
|
|
FROM node:12-alpine as builder
|
|
|
|
|
2020-03-04 02:41:16 +04:00
|
|
|
ARG EXAMPLES_DIR_SRC
|
|
|
|
ARG EXAMPLES_DIR_DEST=packages/client/examples
|
|
|
|
|
2020-02-07 07:04:18 +04:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY package.json package.json
|
|
|
|
COPY yarn.lock yarn.lock
|
2020-03-04 02:41:16 +04:00
|
|
|
COPY tsconfig.json tsconfig.json
|
2020-02-07 07:04:18 +04:00
|
|
|
COPY packages/client packages/client
|
|
|
|
COPY packages/server packages/server
|
2020-03-04 02:41:16 +04:00
|
|
|
COPY $EXAMPLES_DIR_SRC $EXAMPLES_DIR_DEST
|
2020-02-07 07:04:18 +04:00
|
|
|
|
2020-03-04 02:41:16 +04:00
|
|
|
ENV EXAMPLES_DIR=/app/$EXAMPLES_DIR_DEST
|
2020-02-07 07:04:18 +04:00
|
|
|
|
2020-03-04 02:41:16 +04:00
|
|
|
RUN yarn install
|
2020-02-07 07:04:18 +04:00
|
|
|
RUN yarn workspaces run build
|
|
|
|
|
|
|
|
FROM node:12-buster
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2020-02-11 21:55:31 +04:00
|
|
|
RUN apt-get update && apt-get -y install python3 libev-dev perl pkg-config libgmp-dev libhidapi-dev m4 libcap-dev bubblewrap rsync
|
2020-02-07 07:04:18 +04:00
|
|
|
|
|
|
|
COPY ligo_deb10.deb /tmp/ligo_deb10.deb
|
|
|
|
RUN dpkg -i /tmp/ligo_deb10.deb && rm /tmp/ligo_deb10.deb
|
|
|
|
|
|
|
|
COPY --from=builder /app/packages/client/build /app/client/build
|
|
|
|
COPY --from=builder /app/node_modules /app/node_modules
|
|
|
|
COPY --from=builder /app/packages/server/dist/src /app/server/dist
|
|
|
|
|
|
|
|
ENV STATIC_ASSETS /app/client
|
|
|
|
ENV LIGO_CMD /bin/ligo
|
|
|
|
|
|
|
|
ENTRYPOINT [ "node", "server/dist/index.js" ]
|