-
Notifications
You must be signed in to change notification settings - Fork 0
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
ci/use local dockerfile #2
base: master
Are you sure you want to change the base?
Conversation
I opted to simply build, push and test in every case, unless there is a specific text on the commit. Having both jobs in one workflow requires a more complex hack to check the files that have changed, and I'm having Github Action hack-fatigue |
I figured out how to only do the Docker build step if few files ( |
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.
Looks good to me!
@@ -0,0 +1,24 @@ | |||
FROM hashicorp/terraform:0.12.29 |
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.
Looks like this image inherits from alpine linux, just be aware that alpine uses a different libc (musl) than any other linux operating system (except maybe void? and embedded linux solutions). There are some significant differences in the way the networking system calls work in musl vs glibc (the defacto standard). It shoudn't matter too much here, but I'm suspicious of alpine and musl
FROM hashicorp/terraform:0.12.29 | ||
|
||
ENV BUILD_PACKAGES bash curl-dev curl ruby-dev build-base python3 | ||
ENV RUBY_PACKAGES ruby-full |
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.
These are creating cache layers for each ENV
call. I'd inline these into the RUN
call below that way the packages and the installation appear in a single cache layer
COPY Gemfile* ./ | ||
RUN gem install bundler | ||
RUN bundle config set system 'true' | ||
RUN bundle install |
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.
You could def concat these three RUN
directives with &&
. I think that'd be better for the docker cache long term, though it doesn't super matter for an image this big
RUN bundle install | ||
|
||
|
||
ENTRYPOINT ["/bin/bash"] |
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.
Was this set to terraform
in the parent container?
Use local Dockerfile instead of generic since the Gemfile is specifying per project