2024-06-13 09:32:23 +00:00
|
|
|
FROM node:18.17.1-alpine3.18
|
|
|
|
|
|
|
|
RUN apk --update --no-cache add git python3 alpine-sdk bash curl jq
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
# Get the latest Git commit hash and set in package.json
|
|
|
|
RUN COMMIT_HASH=$(git rev-parse HEAD) && \
|
|
|
|
jq --arg commitHash "$COMMIT_HASH" '.commitHash = $commitHash' package.json > tmp.json && \
|
|
|
|
mv tmp.json package.json
|
|
|
|
|
2024-06-14 05:17:14 +00:00
|
|
|
RUN echo "Installing dependencies and building sushiswap-watcher-ts" && \
|
2024-06-13 09:32:23 +00:00
|
|
|
yarn && yarn build
|