11FROM node:16-alpine@sha256:72a490e7ed8aed68e16b8dc8f37b5bcc35c5b5c56ee3256effcdee63e2546f93
22
3- ARG P2W_BASE_PATH =/usr/src/pyth2wormhole
3+ ARG BASE_PATH =/usr/src
44
55RUN apk --no-cache --update add python3 build-base # Needed by the Ethereum build
66
7- WORKDIR ${P2W_BASE_PATH }
7+ WORKDIR ${BASE_PATH }
88RUN addgroup -S pyth -g 10001 && adduser -S pyth -G pyth -u 10001
99RUN chown -R pyth:pyth .
1010USER pyth
1111
12- WORKDIR ${P2W_BASE_PATH}/ethereum
13- ADD --chown=pyth:pyth target-chains/ethereum .
12+ ADD --chown=pyth:pyth target-chains/ethereum/ target-chains/ethereum
1413RUN npm install && npm run build
1514
1615USER root
@@ -21,20 +20,20 @@ USER pyth
2120# Adds p2w-sdk/js dependency
2221ARG P2W_SDK_REL_PATH=third_party/pyth/p2w-sdk/js
2322
24- WORKDIR ${P2W_BASE_PATH }/${P2W_SDK_REL_PATH}
23+ WORKDIR ${BASE_PATH }/${P2W_SDK_REL_PATH}
2524ADD --chown=pyth:pyth ${P2W_SDK_REL_PATH} .
2625
2726RUN npm ci && npm run build && npm cache clean --force
2827
2928# Add the code and compile
3029ARG P2W_RELAY_REL_PATH=third_party/pyth/p2w-relay
3130
32- WORKDIR ${P2W_BASE_PATH }/${P2W_RELAY_REL_PATH}
31+ WORKDIR ${BASE_PATH }/${P2W_RELAY_REL_PATH}
3332ADD --chown=pyth:pyth ${P2W_RELAY_REL_PATH} .
3433
3534RUN npm ci && npm run build && npm cache clean --force
3635
3736# If you are building for production
3837# RUN npm ci --only=production
3938
40- RUN mkdir -p ${P2W_BASE_PATH }/${P2W_RELAY_REL_PATH}/logs
39+ RUN mkdir -p ${BASE_PATH }/${P2W_RELAY_REL_PATH}/logs
0 commit comments