-
Notifications
You must be signed in to change notification settings - Fork 37
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
Apply latest che-machine-exec changes. #15
Apply latest che-machine-exec changes. #15
Conversation
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Dockerfile
Outdated
@@ -15,6 +15,7 @@ WORKDIR /go/src/github.com/eclipse/che-machine-exec/ | |||
COPY . . | |||
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-w -s' -a -installsuffix cgo -o che-machine-exec . | |||
|
|||
FROM registry.centos.org/centos:7 | |||
FROM alpine:3.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious, we're not able to use scratch image ?
https://medium.com/@chemidy/create-the-smallest-and-secured-golang-docker-image-based-on-scratch-4752223b7324#ae0c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks, We can. Size will be really less: from 30.3 Mb to 29.9 Mb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is so big ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
che-machine-exec binary -> 24Mb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we know what inside is taking so much data ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use client libraries to work with kubernetes and docker. That's why I think it has such size.
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Dockerfile
Outdated
WORKDIR /go/src/github.com/eclipse/che-machine-exec/ | ||
COPY . . | ||
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-w -s' -a -installsuffix cgo -o che-machine-exec . | ||
RUN apk add --no-cache ca-certificates | ||
|
||
FROM alpine:3.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're still using from alpine instead of scratch ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used scratch image - 25.5 Mb. che-machine-exec binary -> 24Mb. Tested on the openshift.io - works.
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
@benoitf I want to merge this pull request. You Don't mind? |
@AndrienkoAleksandr sure, was only question from my side |
References issue:
#13
Add kubernetes implementation.
Use alpine image like base for Dockerfile.