diff --git a/docs/faucet.Dockerfile b/docs/faucet.Dockerfile deleted file mode 100644 index 7546b5e1..00000000 --- a/docs/faucet.Dockerfile +++ /dev/null @@ -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 [""] diff --git a/packages/faucet/Dockerfile b/packages/faucet/Dockerfile new file mode 100644 index 00000000..8297efdf --- /dev/null +++ b/packages/faucet/Dockerfile @@ -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"]