Docker image for the cli

I wanted an easy way to test the cli tool but didn't want to have to install it, so I've created a Docker image for it: https://hub.docker.com/r/aaronpowell/1password-cli/ (GitHub repo: https://github.com/aaronpowell/1password-cli-docker).

Feedback welcome :smile:


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided

Comments

  • rickfillionrickfillion Junior Member

    AgileBits Team Member

    Cool! Thanks for doing that. As we work towards the 1.0 we'll be looking at finding more ways of distributing the build.

    Rick

  • cohixcohix

    AgileBits Team Member

    @aaronpowell That's fantastic, thanks for doing that :)

  • cohixcohix

    AgileBits Team Member
  • @cohix - image updated and a new tag is out for it.

    I want to create an alpine image, but I need to work out how (if at all) I can run the cli on alpine (last night I didn't get far)

  • rickfillionrickfillion Junior Member

    AgileBits Team Member

    Let us know if there's any information that we could provide that could help you with that.

    Rick

  • Sorry to bump this but I just now found out about this CLI tool. Since I didn't find an image at your docker hub using alpine I made one.

    FROM alpine:latest
    
    RUN apk add --update \
        bash curl libc6-compat unzip jq && \
        curl -o 1password.zip https://cache.agilebits.com/dist/1P/op/pkg/v0.1.1/op_linux_amd64_v0.1.1.zip && \
        unzip 1password.zip -d /usr/bin && \
        rm 1password.zip
    
    ENTRYPOINT /bin/bash
    

    And seems to be working

    $ docker exec op_alpine_1 op --version
    0.1.1
    
  • cohixcohix

    AgileBits Team Member

    @bombsimon That's awesome! I'll give it a try later on.

  • SmudgeSmudge Junior Member

    @rickfillion So that we can script install and updates, would it be possible for your Release Engineering Team to create static symbolic links that point to the latest beta and release files?

    This way scripts like the Docker one above would not have to be updated every time a new version is available. We could use commands like these in the scripts.
    curl -o 1P-beta.zip https://cache.agilebits.com/dist/1P/op/pkg/op_darwin_386_latest.zip
    curl -o 1P-release.zip https://cache.agilebits.com/dist/1P/op/pkg/op_darwin_386_current.zip

    For example, here would be a static link for "latest" which is pointing to the most recent beta version
    /dist/1P/op/pkg/op_darwin_386_latest.zip -> v0.1.1/op_darwin_386_v0.1.1.zip

    When the non-beta 1.0 version is released, they would create
    /dist/1P/op/pkg/op_darwin_386_current.zip -> v1.0.0/op_darwin_386_v1.0.0.zip
    but also set "latest" to the same.
    /dist/1P/op/pkg/op_darwin_386_latest.zip -> v1.0.0/op_darwin_386_v1.0.0.zip
    or even
    /dist/1P/op/pkg/op_darwin_386_latest.zip -> op_darwin_386_current.zip

    I hope they are using automated scripts to build and push the files to the web server. If so, it would be a minor addition to the scripts to do this automatically for each release.

    Thanks

  • rickfillionrickfillion Junior Member

    AgileBits Team Member

    I think our update server already makes this possible, I'll just need to talk to our ops team to have them remind me how it can be done. I have a feeling that it might not like the fact that we have 74 different platforms though (ok I exaggerate a little).

    Rick

  • rickfillionrickfillion Junior Member

    AgileBits Team Member

    OK I found out what it was that I was remembering, and while it might work I suspect you'll tell me that it's a little more work than you're looking to do.

    Our update server has an endpoint https://app-updates.agilebits.com/latest

    It can tell you about the latest releases of our apps. So you could use its response's CLI.release.version in order to create the URL you're looking for. Not being super familiar with docker scripts I'm not sure what's all possible there.

    Rick

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file