fix(image): remove yargs from bundle, add to image
This commit is contained in:
parent
50bdfba8e3
commit
14a51eefaa
|
@ -6,11 +6,14 @@ RUN apk add --update jq \
|
|||
&& yarn global add bunyan
|
||||
ENV PATH="${PATH}:$(yarn global bin)"
|
||||
|
||||
WORKDIR /salty-dog
|
||||
|
||||
# copy config, which changes rarely
|
||||
COPY docs/config-docker.yml /root/.salty-dog.yml
|
||||
|
||||
# copy package first, to invalidate other layers when version changes
|
||||
COPY package.json /salty-dog/package.json
|
||||
RUN yarn install --production
|
||||
|
||||
# copy chunks, largest to smallest (entrypoint)
|
||||
COPY out/vendor.js /salty-dog/out/vendor.js
|
||||
|
@ -18,10 +21,9 @@ COPY out/main.js /salty-dog/out/main.js
|
|||
COPY out/index.js /salty-dog/out/index.js
|
||||
|
||||
# set up as global cli tool
|
||||
WORKDIR /salty-dog
|
||||
RUN yarn global add file:$(pwd)
|
||||
|
||||
COPY rules /salty-dog/rules
|
||||
|
||||
ENTRYPOINT [ "node", "/salty-dog/out/index.js" ]
|
||||
CMD [ "--help" ]
|
||||
CMD [ "--help" ]
|
||||
|
|
|
@ -7,11 +7,14 @@ RUN apt-get update -y \
|
|||
&& yarn global add bunyan
|
||||
ENV PATH="${PATH}:$(yarn global bin)"
|
||||
|
||||
WORKDIR /salty-dog
|
||||
|
||||
# copy config, which changes rarely
|
||||
COPY docs/config-docker.yml /root/.salty-dog.yml
|
||||
|
||||
# copy package first, to invalidate other layers when version changes
|
||||
COPY package.json /salty-dog/package.json
|
||||
RUN yarn install --production
|
||||
|
||||
# copy chunks, largest to smallest (entrypoint)
|
||||
COPY out/vendor.js /salty-dog/out/vendor.js
|
||||
|
@ -19,10 +22,9 @@ COPY out/main.js /salty-dog/out/main.js
|
|||
COPY out/index.js /salty-dog/out/index.js
|
||||
|
||||
# set up as global cli tool
|
||||
WORKDIR /salty-dog
|
||||
RUN yarn global add file:$(pwd)
|
||||
|
||||
COPY rules /salty-dog/rules
|
||||
|
||||
ENTRYPOINT [ "node", "/salty-dog/out/index.js" ]
|
||||
CMD [ "--help" ]
|
||||
CMD [ "--help" ]
|
||||
|
|
|
@ -96,10 +96,11 @@
|
|||
"tslint-clean-code": "0.2.10",
|
||||
"tslint-microsoft-contrib": "6.2.0",
|
||||
"tslint-sonarts": "1.9.0",
|
||||
"typescript": "4.2.3",
|
||||
"typescript": "4.2.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"yargs": "16.2.0"
|
||||
},
|
||||
"dependencies": {},
|
||||
"nyc": {
|
||||
"extends": "@istanbuljs/nyc-config-typescript"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue