I need the mender-cli in a docker container. There is already a dockerfile in the repository. mender-cli/Dockerfile at master · mendersoftware/mender-cli · GitHub
I guess it wouldn’t cost much providing this on hub.docker.com, woulnd’t it?
Hi @siredmar you’re right it probably would not but in the meantime can you build it yourself?
@mzedel can you comment on the feasibility of pushing this container to Docker hub?
that should be possible - I think @lluiscampos knows best which steps we need to set up the Docker hub repo, however an on the fly build should be almost as fast as downloading the image using something like:
cat >Dockerfile.cli <<EOF
ADD https://downloads.mender.io/mender-cli/master/linux/mender-cli /
RUN chmod +x mender-cli
docker build -f Dockerfile.cli -t mendersoftware/mender-cli .
but I don’t see any reason to not also have this available as an image
It is not about the effort of publishing it on mender-cli, is more that we consider it to be an standalone tool and we only distribute it in its binary form (same as for
mender-artifact, for example).
Can you elaborate a bit more on the use case for having
mender-cli in a container? In which scenarios is this useful?
Hi @lluiscampos ,
the use case is simple. We build our yocto with concourse CI and i want to upload the mender artifact we build to mender.io. Thus i need mender-cli in a container. It would be nice if mender would provide and maintain this container image.
@siredmar Thanks. It makes sense.
I’ll move forward this discussion internally in the team and take a decision. Same applies to
mender-artifact, so I’ll keep both in mind when discussing.
Meanwhile you can use the snippet that @mzedel drafted above and publish your own image for your CI.
By the way, I didn’t know about Concourse CI, thanks!
Hi @lluiscampos and @siredmar :
Find here a containerized mender-cli: Docker Hub, built with that repo: GitHub - ci4rail/mender-cli: A general-purpose CLI for the Mender backend.
For example, I can show the available artifacts with the following command:
docker run -it --entrypoint /bin/sh ci4rail/mender-cli:master -c "/mender-cli login --username <user> --password <passwd>; /mender-cli artifacts list;