Skip to content

docker vitess/vtctlclient: Install curl#7466

Merged
deepthi merged 1 commit intovitessio:masterfrom
jmoldow:vtctlclient-curl
Feb 8, 2021
Merged

docker vitess/vtctlclient: Install curl#7466
deepthi merged 1 commit intovitessio:masterfrom
jmoldow:vtctlclient-curl

Conversation

@jmoldow
Copy link
Contributor

@jmoldow jmoldow commented Feb 8, 2021

Description

Install curl into the docker image vitess/vtctlclient. That way,
for clients using this container, not only can they interact
with vtctld via vtctlclient, but they can also interact with
vtctld and other Vitess components via their HTTP APIs, and can
also interact with the Kubernetes API server over HTTP.

Signed-off-by: Jordan Moldow jmoldow@alum.mit.edu

Checklist

  • Should this PR be backported? - Ideally, yes, so that the change can be included in any v9.0.1 images.
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

When tested with Docker Desktop for Mac, Docker version 20.10.2,
using the command

    docker build --compress -f Dockerfile -t "vitess/vtctlclient:latest" .

the original Dockerfile generates an artifact that is 94.4MB
(according to docker image ls), whereas the new Dockerfile
generates a 102MB image, about an 8% increase in the image's
size.

I would understand if the team would rather not include this dependency in this slim image.

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build/CI - Docker image vitess/vtctlclient
  • VTAdmin

Install curl into the docker image vitess/vtctlclient. That way,
for clients using this container, not only can they interact
with vtctld via vtctlclient, but they can also interact with
vtctld and other Vitess components via their HTTP APIs, and can
also interact with the Kubernetes API server over HTTP.

When tested with Docker Desktop for Mac, Docker version 20.10.2,
using the command

        docker build --compress -f Dockerfile -t "vitess/vtctlclient:latest" .

the original Dockerfile generates an artifact that is 94.4MB
(according to docker image ls), whereas the new Dockerfile
generates a 102MB image, about an 8% increase in the image's
size.

Signed-off-by: Jordan Moldow <jmoldow@alum.mit.edu>
@deepthi deepthi self-requested a review February 8, 2021 04:43
@dkhenry
Copy link
Contributor

dkhenry commented Feb 8, 2021

I am personally ok with this, but I would want to get @deepthi's opinion before we merge

@deepthi
Copy link
Collaborator

deepthi commented Feb 8, 2021

I am personally ok with this, but I would want to get @deepthi's opinion before we merge

We incline towards adding useful tools to the images. For a large image like lite we just want to be very thoughtful about what we include so we might debate a bit more.

@deepthi deepthi merged commit dec0cf5 into vitessio:master Feb 8, 2021
@jmoldow jmoldow deleted the vtctlclient-curl branch February 8, 2021 18:43
@jmoldow
Copy link
Contributor Author

jmoldow commented Feb 8, 2021

Just adding a note here: before this merged, https://hub.docker.com/r/vitess/vtctlclient/tags?page=1&ordering=last_updated&name=latest showed Compressed Size as 36.24 MB.

I'll write what the size is after the new latest image is built and pushed.

jmoldow added a commit to jmoldow/vitess that referenced this pull request Feb 8, 2021
Install curl into the docker image vitess/vtctlclient. That way,
for clients using this container, not only can they interact
with vtctld via vtctlclient, but they can also interact with
vtctld and other Vitess components via their HTTP APIs, and can
also interact with the Kubernetes API server over HTTP.

When tested with Docker Desktop for Mac, Docker version 20.10.2,
using the command

        docker build --compress -f Dockerfile -t "vitess/vtctlclient:latest" .

the original Dockerfile generates an artifact that is 94.4MB
(according to docker image ls), whereas the new Dockerfile
generates a 102MB image, about an 8% increase in the image's
size.

Backport of pull request vitessio#7466.

Signed-off-by: Jordan Moldow <jmoldow@alum.mit.edu>
@jmoldow
Copy link
Contributor Author

jmoldow commented Feb 9, 2021

After this merged, https://hub.docker.com/r/vitess/vtctlclient/tags?page=1&ordering=last_updated&name=latest showed Compressed Size as 37.85 MB.

A 4.4% / 1.61 MB increase in Compressed Size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants