Add docker dir to build mempool containers

This commit is contained in:
Bastien
2021-02-01 17:25:08 +01:00
parent ffb9d01f85
commit d28f8d11bf
12 changed files with 444 additions and 0 deletions

28
docker/backend/Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
FROM node:12-buster-slim AS builder
WORKDIR /build
COPY . .
RUN apt-get update
RUN apt-get install -y build-essential python3 pkg-config
RUN npm ci --production
RUN npm i typescript
RUN npm run build
FROM node:12-buster-slim
WORKDIR /backend
RUN mkdir cache
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"]