forked from flare-foundation/attestation-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (24 loc) · 940 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# docker build -t attestation-suite .
# docker-compose -f docker-compose-indexer-btc.yaml up
FROM node:16
WORKDIR /app/attestation-client
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "yarn.lock", "./"]
ENV DEBIAN_FRONTEND=noninteractive
RUN \
apt-get update && \
curl -L -o /tmp/mysql-apt-config_0.8.24-1_all.deb https://dev.mysql.com/get/mysql-apt-config_0.8.24-1_all.deb && \
apt-get install lsb-release -y && \
dpkg -i /tmp/mysql-apt-config_0.8.24-1_all.deb && \
apt-get update && \
apt-get -y install mysql-client && \
yarn install --frozen-lockfile
COPY . .
RUN yarn c && yarn build
EXPOSE 3000
# RUN chown -R node /app/attestation-client
RUN mkdir -p /app/attestation-client/logs && chown -R node /app/attestation-client/logs
USER node
ENV PATH="${PATH}:/app/attestation-client/docker/scripts"
ENV NODE_ENV=production
ENTRYPOINT [ "/app/attestation-client/docker/scripts/entrypoint.sh" ]
CMD [ "indexer" ]