Merge pull request #1065 from cosmos/faucet-dockerfile

Adding faucet dockerfile
This commit is contained in:
Simon Warta 2022-03-02 13:16:17 +01:00 committed by GitHub
commit 2323f3b3d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 15 deletions

View File

@ -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 [""]

View 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"]