mirror of
https://github.com/mempool/mempool.git
synced 2024-12-27 00:34:28 +01:00
30 lines
489 B
Docker
30 lines
489 B
Docker
FROM node:16.15.0-buster-slim AS builder
|
|
|
|
ARG commitHash
|
|
ENV DOCKER_COMMIT_HASH=${commitHash}
|
|
|
|
WORKDIR /build
|
|
COPY . .
|
|
|
|
RUN apt-get update
|
|
RUN apt-get install -y build-essential python3 pkg-config
|
|
RUN npm install
|
|
RUN npm run build
|
|
|
|
FROM node:16.15.0-buster-slim
|
|
|
|
WORKDIR /backend
|
|
|
|
COPY --from=builder /build/ .
|
|
|
|
RUN chmod +x /backend/start.sh
|
|
RUN chmod +x /backend/wait-for-it.sh
|
|
|
|
RUN chown -R 1000:1000 /backend && chmod -R 755 /backend
|
|
|
|
USER 1000
|
|
|
|
EXPOSE 8999
|
|
|
|
CMD ["/backend/start.sh"]
|