Merge pull request #1065 from cosmos/faucet-dockerfile
Adding faucet dockerfile
This commit is contained in:
commit
2323f3b3d2
@ -1,15 +0,0 @@
|
||||
# The only officially supported distribution channel of the faucet binary is @cosmjs/faucet on npmjs.com
|
||||
# This is an example file of how to wrap the faucet in a docker container.
|
||||
# This file will be outdated very soon, but should work as a template for your custom docker setup.
|
||||
|
||||
# Coose from https://hub.docker.com/_/node/
|
||||
FROM node:12.18.3-alpine
|
||||
|
||||
RUN yarn global add @cosmjs/faucet@0.23.0
|
||||
|
||||
# Check it exists
|
||||
RUN /usr/local/bin/cosmos-faucet version
|
||||
|
||||
EXPOSE 8000
|
||||
ENTRYPOINT ["/usr/local/bin/cosmos-faucet"]
|
||||
CMD [""]
|
||||
22
packages/faucet/Dockerfile
Normal file
22
packages/faucet/Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
# Build:
|
||||
# docker build -t confio/cosmos-faucet:manual -f packages/faucet/Dockerfile .
|
||||
# Run:
|
||||
# docker run --rm confio/cosmos-faucet:manual version
|
||||
|
||||
FROM node:14-alpine as build-env
|
||||
|
||||
ADD . /app
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --update --no-cache alpine-sdk linux-headers build-base gcc libusb-dev python3 eudev-dev && ln -sf python3 /usr/bin/python
|
||||
RUN python3 -m ensurepip
|
||||
RUN pip3 install --no-cache --upgrade pip setuptools
|
||||
|
||||
RUN yarn install && yarn run build
|
||||
|
||||
FROM node:14-alpine
|
||||
COPY --from=build-env /app /app
|
||||
WORKDIR /app
|
||||
|
||||
EXPOSE 8000
|
||||
ENTRYPOINT ["yarn", "node", "/app/packages/faucet/bin/cosmos-faucet"]
|
||||
Loading…
Reference in New Issue
Block a user