Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Swapped out centos for alpine #4412

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM centos:7
FROM alpine:3.10

Choose a reason for hiding this comment

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

+1, I love the idea of switching to Alpine. I am using Alpine myself when testing images and have a very similar Dockerfile. It makes building and pushing custom images more lightweight. For what it's worth I am using:

FROM alpine:3.10

RUN apk --update add ca-certificates git

COPY ./build/linux/jx /usr/bin/jx

I find the current ENTRYPOINT just gets into the way when using the image. I'd remove it.

One thing to keep in mind here is that we might want to try to align the used based images. @jstrachan and I had a discussion around this the other day and James was interested in somehow trying to align on a common base image. Also, he mentioned that centos was originally used due to some issues (DNS!?) with Alpine. For my part I have not seen any problems yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

Alpine has had horrendous issues relating to DNS resolution within Kubernetes that they never seemed to be able to resolve and generally blamed upon “dependencies outside their control”.

Alpine is also not compatible with certain physical infrastructure in the cloud, such as GPU cards, due to a lack of driver support. For this reason, the machine learning builders require Centos.

Choose a reason for hiding this comment

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

Alpine has had horrendous issues relating to DNS resolution within Kubernetes that they never seemed to be able to resolve and generally blamed upon “dependencies outside their control”.

I guess you are referring to gliderlabs/docker-alpine#255. I was not aware of this issue and have not noticed it before.

I wonder though if it is really alpine specific. I wonder whether the issues we seeing at times to clone a git repo are not also related to DNS issues. But that's just a guess.

That said, I am not bound to alpine at all. I just would like to have a more leight weight default image.

Alpine is also not compatible with certain physical infrastructure in the cloud, such as GPU cards, due to a lack of driver support. For this reason, the machine learning builders require Centos.

Sure, there are always special needs. But in the end you can always use custom images, right?

But maybe this should be discussed on an issue instead.

Choose a reason for hiding this comment

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

I opened #4481

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this going to have a knock-on effect to the other builder images?

It shouldn't, I don't believe this is used as a base image

Choose a reason for hiding this comment

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

How do we move forward with this PR?


RUN yum install -y git
RUN apk --no-cache --update add \
git \
bash

ENTRYPOINT ["jx", "version"]

COPY ./build/linux/jx /usr/bin/jx
COPY ./build/linux/jx /usr/bin/jx