Skip to content

Conversation

@hchoudharysumologic
Copy link
Contributor

modifying docker file to alpine:3.14 based on https://sumologic.slack.com/archives/C02DUQT0A/p1653040106604689

modifying docker file to alpine:3.14
@aiwaniuk
Copy link

is it tested?

aiwaniuk-mac:sumologic-collector-docker aiwaniuk$ docker build . -t col-al
[+] Building 4.0s (6/7)
 => [internal] load build definition from Dockerfile                                                                                                                                                                                   0.1s
 => => transferring dockerfile: 784B                                                                                                                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                      0.0s
 => => transferring context: 54B                                                                                                                                                                                                       0.0s
 => [internal] load metadata for docker.io/library/alpine:3.14                                                                                                                                                                         2.4s
 => [1/3] FROM docker.io/library/alpine:3.14@sha256:4c869a63e1b7c0722fed1e402a6466610327c3b83bdddb94bd94fb71da7f638a                                                                                                                   0.9s
 => => resolve docker.io/library/alpine:3.14@sha256:4c869a63e1b7c0722fed1e402a6466610327c3b83bdddb94bd94fb71da7f638a                                                                                                                   0.0s
 => => sha256:4c869a63e1b7c0722fed1e402a6466610327c3b83bdddb94bd94fb71da7f638a 1.64kB / 1.64kB                                                                                                                                         0.0s
 => => sha256:92d13cc58a46e012300ef49924edc56de5642ada25c9a457dce4a6db59892650 528B / 528B                                                                                                                                             0.0s
 => => sha256:dd53f409bf0bd55eac632f9e694fd190244fef5854a428bf3ae1e2b636577623 1.47kB / 1.47kB                                                                                                                                         0.0s
 => => sha256:c7ed990a2339ee598662849de4f56e2241399f5a32340c8c4a7bbd5378a12b5f 2.83MB / 2.83MB                                                                                                                                         0.3s
 => => extracting sha256:c7ed990a2339ee598662849de4f56e2241399f5a32340c8c4a7bbd5378a12b5f                                                                                                                                              0.5s
 => [internal] load build context                                                                                                                                                                                                      0.5s
 => => transferring context: 5.70kB                                                                                                                                                                                                    0.5s
 => ERROR [2/3] RUN apt-get update --quiet &&  apt-get install -y --no-install-recommends apt-utils &&  apt-get upgrade --quiet --allow-downgrades --allow-remove-essential --allow-change-held-packages -y &&  apt-get install --qui  0.4s
------
 > [2/3] RUN apt-get update --quiet &&  apt-get install -y --no-install-recommends apt-utils &&  apt-get upgrade --quiet --allow-downgrades --allow-remove-essential --allow-change-held-packages -y &&  apt-get install --quiet --allow-downgrades --allow-remove-essential --allow-change-held-packages -y wget &&  wget -q -O /tmp/collector.deb https://collectors.sumologic.com/rest/download/deb/64 &&  dpkg -i /tmp/collector.deb &&  rm /tmp/collector.deb &&  apt-get clean --quiet &&  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*:
#5 0.339 /bin/sh: apt-get: not found
------
executor failed running [/bin/sh -c apt-get update --quiet &&  apt-get install -y --no-install-recommends apt-utils &&  apt-get upgrade --quiet --allow-downgrades --allow-remove-essential --allow-change-held-packages -y &&  apt-get install --quiet --allow-downgrades --allow-remove-essential --allow-change-held-packages -y wget &&  wget -q -O /tmp/collector.deb https://collectors.sumologic.com/rest/download/deb/64 &&  dpkg -i /tmp/collector.deb &&  rm /tmp/collector.deb &&  apt-get clean --quiet &&  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*]: exit code: 127

doesn't work for me

@aiwaniuk
Copy link

btw, we may want to have for some time released two distributiions
ubuntu and alpine (if for some reasone customer can't use alpine and they will be unhappy with migrating from ubuntu)

@that-kampe-steak
Copy link

that-kampe-steak commented Nov 21, 2022

Does this fix #103 ?

Looks like image still using apt instead of apk for alpine too

@hchoudharysumologic
Copy link
Contributor Author

image

Fixed some of the apk issues but getting this installation error, looks like the collector deb can't be installed on this system.

@hchoudharysumologic
Copy link
Contributor Author

@aiwaniuk do you think we should try installing the rpm version on this instead? Otherwise looks like this is not feasible on alpine since we do install the deb version as a required dependency on the ubuntu docker image now

@aiwaniuk
Copy link

@hchoudharysumologic Well, I"m not sure how exactly but I guess it is possible somehow install and run our collector on alpine (I'm not so familiar with this distro to know details) and it is excepted that installing it will look a bit different than in ubuntu

@belong-events
Copy link
Contributor

This PR lacks reasoning why this change is needed. I personally like Debian (In this case a derivative, Ubuntu) images a lot. Because all the utilities within the container are not crippled to a bare minimum, and it is easy to extend and debug and do custom modifications. Only reason I could see for Alpine is the size.

Perhaps there could be two images in parallel? Debian-based and Alpine-based.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants