Skip to content

DNS challenges with Kubernetes and Alpine #716

Closed

Description

@olvlvl

Hi,

Alpine has a known issue regarding DNS resolving. Our only solution right now is to use Debian images instead, but they are bigger, like ~5 times bigger. Would you consider adding support for ubuntu:bionic? Its file size is comparable to Alpine's and it's working fine, at least on our infrastructure.

Activity

  1. tianon commented on Sep 13, 2018

    @tianon
    Member

    Would you consider adding support for ubuntu:bionic? Its file size is comparable to Alpine's ...

    I'm not sure where this idea comes from, but I don't think it's accurate:

    alpine:3.8           4.41MB
    alpine:3.7           4.21MB
    ubuntu:xenial        115MB
    ubuntu:trusty        188MB
    ubuntu:cosmic        71.3MB
    ubuntu:bionic        84.1MB
    debian:wheezy-slim   46.9MB
    debian:stretch-slim  55.3MB
    debian:sid-slim      66.6MB
    debian:jessie-slim   79.2MB
    debian:buster-slim   66.1MB

    (We're currently based on debian:stretch-slim.)

  2. added
    RequestRequest for image modification or feature
    on Sep 13, 2018
  3. olvlvl commented on Sep 13, 2018

    @olvlvl
    Author

    I tried to create an image using ubuntu:bionic but it failed on COPY docker-php-source /usr/local/bin/. I see that debian's base image is pretty slim, bionic might not be an improvement. Still, what's up with the resulting image?

    Base image Size With CLI Increase
    alpine:3.8 4.41MB 77.5MB 73MB
    debian:stretch-slim 55.3MB 368MB 312MB
  4. tianon commented on Sep 13, 2018

    @tianon
    Member

    For Alpine-based images we're able to get a lot more aggressive about removing packages and re-adding them at runtime when users need them since packages typically install very quickly (see PHPIZE_DEPS for what I'm talking about) -- I imagine those are probably a pretty sizeable contributor to that difference in increase.

  5. tianon commented on Sep 13, 2018

    @tianon
    Member

    If you do docker history on each image, you should be able to get a little more granular:

    $ docker history php:7.2-cli-alpine
    IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
    1163be6aecce        44 hours ago        /bin/sh -c #(nop)  CMD ["php" "-a"]             0B                  
    <missing>           44 hours ago        /bin/sh -c #(nop)  ENTRYPOINT ["docker-php-e…   0B                  
    <missing>           44 hours ago        /bin/sh -c docker-php-ext-enable sodium         168kB               
    <missing>           44 hours ago        /bin/sh -c #(nop) COPY multi:2cdcedabcf5a3b9…   6.42kB              
    <missing>           44 hours ago        /bin/sh -c set -xe  && apk add --no-cache --…   58.1MB              
    <missing>           44 hours ago        /bin/sh -c #(nop) COPY file:207c686e3fed4f71…   587B                
    <missing>           44 hours ago        /bin/sh -c set -xe;   apk add --no-cache --v…   12.2MB              
    <missing>           44 hours ago        /bin/sh -c #(nop)  ENV PHP_SHA256=3585c1222e…   0B                  
    <missing>           44 hours ago        /bin/sh -c #(nop)  ENV PHP_URL=https://secur…   0B                  
    <missing>           44 hours ago        /bin/sh -c #(nop)  ENV PHP_VERSION=7.2.9        0B                  
    <missing>           44 hours ago        /bin/sh -c #(nop)  ENV GPG_KEYS=1729F83938DA…   0B                  
    <missing>           45 hours ago        /bin/sh -c #(nop)  ENV PHP_LDFLAGS=-Wl,-O1 -…   0B                  
    <missing>           45 hours ago        /bin/sh -c #(nop)  ENV PHP_CPPFLAGS=-fstack-…   0B                  
    <missing>           45 hours ago        /bin/sh -c #(nop)  ENV PHP_CFLAGS=-fstack-pr…   0B                  
    <missing>           45 hours ago        /bin/sh -c mkdir -p $PHP_INI_DIR/conf.d         0B                  
    <missing>           45 hours ago        /bin/sh -c #(nop)  ENV PHP_INI_DIR=/usr/loca…   0B                  
    <missing>           45 hours ago        /bin/sh -c set -x  && addgroup -g 82 -S www-…   4.85kB              
    <missing>           45 hours ago        /bin/sh -c apk add --no-cache --virtual .per…   2.69MB              
    <missing>           45 hours ago        /bin/sh -c #(nop)  ENV PHPIZE_DEPS=autoconf …   0B                  
    <missing>           47 hours ago        /bin/sh -c #(nop)  CMD ["/bin/sh"]              0B                  
    <missing>           47 hours ago        /bin/sh -c #(nop) ADD file:25c10b1d1b41d46a1…   4.41MB              
    $ docker history php:7.2-cli
    IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
    71c6a3058357        6 days ago          /bin/sh -c #(nop)  CMD ["php" "-a"]             0B                  
    <missing>           6 days ago          /bin/sh -c #(nop)  ENTRYPOINT ["docker-php-e…   0B                  
    <missing>           6 days ago          /bin/sh -c docker-php-ext-enable sodium         20B                 
    <missing>           6 days ago          /bin/sh -c #(nop) COPY multi:2cdcedabcf5a3b9…   6.42kB              
    <missing>           6 days ago          /bin/sh -c set -eux;   savedAptMark="$(apt-m…   89.6MB              
    <missing>           8 days ago          /bin/sh -c #(nop) COPY file:207c686e3fed4f71…   587B                
    <missing>           8 days ago          /bin/sh -c set -xe;   fetchDeps='   wget  ';…   13.4MB              
    <missing>           8 days ago          /bin/sh -c #(nop)  ENV PHP_SHA256=3585c1222e…   0B                  
    <missing>           8 days ago          /bin/sh -c #(nop)  ENV PHP_URL=https://secur…   0B                  
    <missing>           8 days ago          /bin/sh -c #(nop)  ENV PHP_VERSION=7.2.9        0B                  
    <missing>           8 days ago          /bin/sh -c #(nop)  ENV GPG_KEYS=1729F83938DA…   0B                  
    <missing>           8 days ago          /bin/sh -c #(nop)  ENV PHP_LDFLAGS=-Wl,-O1 -…   0B                  
    <missing>           8 days ago          /bin/sh -c #(nop)  ENV PHP_CPPFLAGS=-fstack-…   0B                  
    <missing>           8 days ago          /bin/sh -c #(nop)  ENV PHP_CFLAGS=-fstack-pr…   0B                  
    <missing>           8 days ago          /bin/sh -c mkdir -p $PHP_INI_DIR/conf.d         0B                  
    <missing>           8 days ago          /bin/sh -c #(nop)  ENV PHP_INI_DIR=/usr/loca…   0B                  
    <missing>           8 days ago          /bin/sh -c apt-get update && apt-get install…   209MB               
    <missing>           8 days ago          /bin/sh -c #(nop)  ENV PHPIZE_DEPS=autoconf …   0B                  
    <missing>           8 days ago          /bin/sh -c set -eux;  {   echo 'Package: php…   46B                 
    <missing>           9 days ago          /bin/sh -c #(nop)  CMD ["bash"]                 0B                  
    <missing>           9 days ago          /bin/sh -c #(nop) ADD file:e6ca98733431f75e9…   55.3MB              
  6. tianon commented on Feb 6, 2019

    @tianon
    Member

    Closing given that there's not really much we can do here (as far as I can see).

    One other thing you could try is to use something like https://github.com/frol/docker-alpine-glibc in order to get an Alpine build of PHP + glibc (to try and overcome the DNS issues), but that's definitely out of scope for this repository. 👍

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    RequestRequest for image modification or feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions