Skip to content
This repository was archived by the owner on Mar 13, 2019. It is now read-only.

Use Alpine Linux for Tiny Images#19

Closed
kojiromike wants to merge 2 commits into
RobLoach:masterfrom
kojiromike:alpine
Closed

Use Alpine Linux for Tiny Images#19
kojiromike wants to merge 2 commits into
RobLoach:masterfrom
kojiromike:alpine

Conversation

@kojiromike

Copy link
Copy Markdown

I saw there was a PR for using Debian instead of the PHP official images. There's another official image that I think is very useful for building good base images: Alpine. For comparison:

# Current images
$ docker images | grep composer/composer
composer/composer                                   base                eb1df2aafe51        3 weeks ago         521.9 MB
composer/composer                                   1.0.0-alpha8        aa4d3eabda20        3 weeks ago         522.9 MB
composer/composer                                   1.0.0-alpha10       11b069d27b51        3 weeks ago         523 MB
composer/composer                                   latest              b87b6a34ca39        3 weeks ago         523 MB
composer/composer                                   1.0.0-alpha9        58acc7adbc48        3 weeks ago         523 MB

# Alpine images
$ docker images | grep composer/composer
composer/composer                                   1.0.0-alpha8        5b8d2ca4148a        14 minutes ago      22.57 MB
composer/composer                                   1.0.0-alpha9        fc5edf265f13        14 minutes ago      22.64 MB
composer/composer                                   1.0.0-alpha10       e858b3a69ef1        14 minutes ago      22.68 MB
composer/composer                                   latest              e9eb902514ea        17 minutes ago      22.72 MB
composer/composer                                   base                2bf3879927f9        17 minutes ago      21.6 MB

@RobLoach

Copy link
Copy Markdown
Owner

Wow, it ends up being about the same size as the Composer install file.

@cbeier @boedy This is looking pretty good! Mind some additional testing before this gets merged in?

@RobLoach

Copy link
Copy Markdown
Owner

@kojiromike There were some additional extensions introduced in #18 at https://github.com/RobLoach/docker-composer/pull/18/files#diff-9191b36467823e825f341c2f13a49c61R6 , not sure how much we really need them though. Testing locally seemed pretty good.

@kojiromike

Copy link
Copy Markdown
Author

@RobLoach So in thinking about this, I definitely missed git, but maybe I should install the commands for all the supported vcs systems. That does kick the image sizes up to ~90MB, but still respectably small. What do you think?

@kojiromike

Copy link
Copy Markdown
Author

OK, the last commit has support for everything but Perforce, including unrar and pear.

$ docker images | grep composer/composer
composer/composer                                   1.0.0-alpha8        0a61c00d0e9e        6 minutes ago       90.07 MB
composer/composer                                   1.0.0-alpha9        ad14c95ceb13        6 minutes ago       90.15 MB
composer/composer                                   1.0.0-alpha10       14cb66d0231f        6 minutes ago       90.18 MB
composer/composer                                   latest              f7e30f27d6d5        6 minutes ago       90.22 MB
composer/composer                                   base                d5f637f79af5        6 minutes ago       89.11 MB

@sjparkinson

Copy link
Copy Markdown

I'd love to see this merged, currently the image is ~500MB which this change really improves upon!

@deizel

deizel commented Feb 28, 2016

Copy link
Copy Markdown
Contributor

Might want to wait for docker-library/php/pull/176 now?

@andypost

Copy link
Copy Markdown

I suppose better to commit that and file follow-up to wait php containers based on alpine
that will save a lot of time

@derimagia

Copy link
Copy Markdown

php:7.0-alpine is in now, are we waiting on anything else?

@pirog

pirog commented Apr 4, 2016

Copy link
Copy Markdown
Collaborator

+1

Comment thread base/Dockerfile
# Composer Docker Container
# Base Dockerfile: composer/base
FROM php:5.6-cli
FROM alpine:3.1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be alpine:3.3?

@RobLoach

Copy link
Copy Markdown
Owner

The approach taken in #56 is a bit more verbose, so that is now merged. Thank you, @kojiromike, for pushing this forwards. 👍

@kojiromike

Copy link
Copy Markdown
Author

👍

@kojiromike kojiromike closed this Apr 24, 2016
@kojiromike
kojiromike deleted the alpine branch April 24, 2016 21:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants