Boavizta / boaviztapi

🛠 Giving access to BOAVIZTA reference data and methodologies trough a RESTful API
GNU Affero General Public License v3.0
73 stars 23 forks source link

reduce docker image size using distroless #141

Closed AirLoren closed 1 year ago

AirLoren commented 1 year ago

Update Dockerfile to reduce image size using distroless base image with multistage build. Should resolve issue #137

demeringo commented 1 year ago

Thank you @AirLoren, works on my computer (sic) and it seems we are back to a more reasonable 318MB 👍.

da-ekchajzer commented 1 year ago

Thanks for the PR.

I have an issue with the command you have put in the Readme.md :

docker run -p 5000:5000/tcp localhost/boaviztapi will produce the following error :

docker: Error response from daemon: Get "http://localhost/v2/": dial tcp 127.0.0.1:80: connect: connection refused.
See 'docker run --help'.

docker run -p 5000:5000/tcp localhost/boaviztapi:0.2.0 will produce the following error :

Unable to find image 'localhost/boaviztapi:0.2.0' locally
docker: Error response from daemon: Get "http://localhost/v2/": dial tcp 127.0.0.1:80: connect: connection refused.
See 'docker run --help'.

Instead, sudo docker run -p 5000:5000/tcp boaviztapi:0.2.0 will run my local image.

Do you have any idea why do I have such behavior ? And if this is a normal behavior, would you consider updating the README ?

AirLoren commented 1 year ago

This issue seems related to your docker setup. We cannot address all container engine setups in the documentation.


De : David Ekchajzer @.> Envoyé : Sunday, December 18, 2022 10:26:25 PM À : Boavizta/boaviztapi @.> Cc : Romain LORENZINI @.>; Mention @.> Objet : Re: [Boavizta/boaviztapi] reduce docker image size using distroless (PR #141)

Thanks for the PR.

I have an issue with the command you have put in the Readme.md :

docker run -p 5000:5000/tcp localhost/boaviztapi will produce the following error :

docker: Error response from daemon: Get "http://localhost/v2/": dial tcp 127.0.0.1:80: connect: connection refused. See 'docker run --help'.

docker run -p 5000:5000/tcp localhost/boaviztapi:0.2.0 will produce the following error :

Unable to find image 'localhost/boaviztapi:0.2.0' locally docker: Error response from daemon: Get "http://localhost/v2/": dial tcp 127.0.0.1:80: connect: connection refused. See 'docker run --help'.

Instead, sudo docker run -p 5000:5000/tcp boaviztapi:0.2.0 will run my local image.

Do you have any idea why do I have such behavior ? And if this is a normal behavior, would you consider updating the README ?

— Reply to this email directly, view it on GitHubhttps://github.com/Boavizta/boaviztapi/pull/141#issuecomment-1356879436, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARZY6QQOE5A7URJKYSYONJLWN56QDANCNFSM6AAAAAATAISC4Q. You are receiving this because you were mentioned.Message ID: @.***>