2022-05-10 06:59:09 +02:00
|
|
|
FROM node:16.15.0-buster-slim AS builder
|
2021-02-01 17:25:08 +01:00
|
|
|
|
2022-03-23 20:16:21 +01:00
|
|
|
ARG commitHash
|
|
|
|
ENV DOCKER_COMMIT_HASH=${commitHash}
|
|
|
|
|
2021-02-01 17:25:08 +01:00
|
|
|
WORKDIR /build
|
|
|
|
COPY . .
|
2021-02-03 02:12:15 +01:00
|
|
|
|
2021-02-01 17:25:08 +01:00
|
|
|
RUN apt-get update
|
|
|
|
RUN apt-get install -y build-essential python3 pkg-config
|
2021-08-27 09:28:05 +02:00
|
|
|
RUN npm install
|
2021-02-01 17:25:08 +01:00
|
|
|
RUN npm run build
|
2021-02-03 02:12:15 +01:00
|
|
|
|
2022-05-10 06:59:09 +02:00
|
|
|
FROM node:16.15.0-buster-slim
|
2021-02-01 17:25:08 +01:00
|
|
|
|
|
|
|
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"]
|