NEW: flarectl replacing cloudflare-cli

This commit is contained in:
KF 2023-03-01 13:28:17 +08:00
parent 8d8046662c
commit 0e357cb72a
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86
9 changed files with 12 additions and 20 deletions

View File

@ -1,18 +0,0 @@
FROM node:8.14-alpine
LABEL maintainer="Mriyam Tamuli <mbtamuli@gmail.com>"
# Set a working directory
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN npm install
RUN npm link
RUN apk add bash jq httpie
COPY setenv-cl.sh /root/setenv-cl.sh
COPY setenv-rs.sh /root/setenv-rs.sh
COPY list-zones.sh /root/list-zones.sh
RUN wget -O- https://github.com/cloudflare/cloudflare-go/releases/download/v0.15.0/flarectl_0.15.0_linux_amd64.tar.xz | tar Jxf -
RUN mv flarectl /usr/bin/
ENTRYPOINT [ "/bin/bash" ]

@ -1 +0,0 @@
Subproject commit 628e1e80ac65d0307907980b5bbcd3d32e1b2a22

View File

@ -1 +0,0 @@
cfcli -f json zones | jq -cr ".[] | [.name, .status, .account.name, .plan.name]"

View File

@ -0,0 +1,8 @@
FROM alpine:latest
# Set a working directory
RUN apk add go bash jq
RUN go install github.com/cloudflare/cloudflare-go/cmd/flarectl@latest
RUN echo "export PATH=/root/go/bin:$PATH" >> /root/.bashrc
ENTRYPOINT [ "/bin/bash" ]

View File

@ -0,0 +1,4 @@
# Usage:
export CF_API_KEY=xxx
export CF_API_EMAIL=yyy
flarectl dns l --zone your-domain.com