question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

link cli-ext with hasura cli

See original GitHub issue

Currently, cli-ext plugin manifest is placed under the plugins index repo which points to the latest version.

We need to link the cli-ext with the hasura cli version.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
hgiasaccommented, Aug 12, 2020

@picosam New CLI needs extra libraries libstdc and glibc that are missing in base alpine image. You try installing this before run hasura CLI

RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub  
RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-2.31-r0.apk
RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-bin-2.31-r0.apk 
RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-i18n-2.31-r0.apk
RUN apk add glibc-2.31-r0.apk glibc-bin-2.31-r0.apk glibc-i18n-2.31-r0.apk
RUN /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8
RUN apk add --no-cache libstdc++ 
2reactions
jflambertcommented, Aug 12, 2020

Using alpine-glibc was not an option for me, so I ended up adapting @hgiasac’s second script.

@tirumaraiselvan I spent quite a bit of time on this. I strongly suggest you produce an alpine-compatible cli-ext binary, or at least provide official instructions. Here’s my Dockerfile for reference.

# use rabbitmq as a base image, since the apk is not available in alpine as of 3.12
FROM rabbitmq:3-alpine as rabbitmq

# Fetch additional tools and libraries
RUN apk --update add go postgresql-client curl gcc libc-dev libstdc++6 && \
    # install glibc for hasura-cli
    # https://github.com/hasura/graphql-engine/issues/4105#issuecomment-609639030
    wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
    wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk && \
    wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-bin-2.32-r0.apk && \
    wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-i18n-2.32-r0.apk && \
    apk add glibc-2.32-r0.apk && \
    # handle glibc trigger error
    # https://github.com/sgerrand/alpine-pkg-glibc/issues/119#issuecomment-626627458
    rm -f /usr/glibc-compat/lib/ld-linux-x86-64.so.2 && \
    ln -s /usr/glibc-compat/lib/ld-2.32.so /usr/glibc-compat/lib/ld-linux-x86-64.so.2 && \
    apk add glibc-bin-2.32-r0.apk glibc-i18n-2.32-r0.apk && \
    /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 && \
    # install hasura-cli
    curl -L# -f -o /bin/hasura-cli https://github.com/hasura/graphql-engine/releases/download/v1.3.0/cli-hasura-linux-amd64 && chmod +x /bin/hasura-cli &&\
    # test all tools
    go version && rabbitmq-diagnostics version && pg_isready -V && hasura-cli version --skip-update-check
Read more comments on GitHub >

github_iconTop Results From Across the Web

hasura console | Hasura GraphQL Docs - Hasura CLI
Open the console to manage the database and try out APIs using the Hasura CLI. ... Connect to an instance specified by the...
Read more >
hasura/graphql-engine:v2.0.0-alpha.1.cli-migrations-v2
COPY file:2953721f1974aff3d11fd15f5da19f40c47e0151868c69dc7ef264623194b539 in /opt/cli-ext/cli-ext-hasura-linux.tar.gz.
Read more >
Hasura GraphQL Engine CLI - Go Packages
Package cli and it's sub packages implements the command line tool for Hasura GraphQL Engine.
Read more >
Hasura Migration failed : Required privilege is not held by client
sudo hasura plugins install cli-ext. then hasura migrate apply --endpoint http://192.168.99.100:8080/. Share. Share a link to this answer.
Read more >
fix: conn string for updated graphql-engine… - input-output-hk ...
ln -s ${hasura-cli-ext}/bin/cli-ext-hasura-linux ~/.hasura/plugins/store/cli-ext/v${hasura-cli-ext.version}/cli-ext-hasura-linux ... "url" VARCHAR.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found