Skip to content

Commit

Permalink
Fix builds for kaniko-users
Browse files Browse the repository at this point in the history
  • Loading branch information
Phileas Lebada committed Feb 22, 2021
1 parent 265702f commit e745fb0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
15 changes: 7 additions & 8 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ RUN apk add --no-cache \
gmp-dev

# skip installing gem documentation
RUN set -eux; \
mkdir -p /usr/local/etc; \
{ \
echo 'install: --no-document'; \
echo 'update: --no-document'; \
} >> /usr/local/etc/gemrc
RUN mkdir -p /usr/local/etc; \
printf '%s\n' \
'install: --no-document' \
'update: --no-document' \
>> /usr/local/etc/gemrc

ENV LANG C.UTF-8
ENV RUBY_MAJOR %%VERSION%%
Expand Down Expand Up @@ -71,11 +70,11 @@ RUN apk add --no-cache --virtual .ruby-builddeps \
\
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
# warning: Insecure world writable dir
{ \
( \
echo '#define ENABLE_PATH_CHECK 0'; \
echo; \
cat file.c; \
} > file.c.new; \
) > file.c.new; \
mv file.c.new file.c; \
\
autoconf; \
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ SHELL ["/bin/bash", "-eux", "-c"]

# skip installing gem documentation
RUN mkdir -p /usr/local/etc; \
{ \
echo 'install: --no-document'; \
echo 'update: --no-document'; \
} >> /usr/local/etc/gemrc
printf '%s\n' \
'install: --no-document' \
'update: --no-document' \
>> /usr/local/etc/gemrc

ENV LANG C.UTF-8
ENV RUBY_MAJOR %%VERSION%%
Expand Down Expand Up @@ -38,11 +38,11 @@ RUN savedAptMark="$(apt-mark showmanual)"; \
\
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
# warning: Insecure world writable dir
{ \
( \
echo '#define ENABLE_PATH_CHECK 0'; \
echo; \
cat file.c; \
} > file.c.new; \
) > file.c.new; \
mv file.c.new file.c; \
\
autoconf; \
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile-slim.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ RUN apt-get update; \

# skip installing gem documentation
RUN mkdir -p /usr/local/etc; \
{ \
echo 'install: --no-document'; \
echo 'update: --no-document'; \
} >> /usr/local/etc/gemrc
printf '%s\n' \
'install: --no-document' \
'update: --no-document' \
>> /usr/local/etc/gemrc

ENV LANG C.UTF-8
ENV RUBY_MAJOR %%VERSION%%
Expand Down Expand Up @@ -98,7 +98,7 @@ RUN savedAptMark="$(apt-mark showmanual)"; \
# make sure bundled "rubygems" is older than RUBYGEMS_VERSION (https://github.com/docker-library/ruby/issues/246)
ruby -e 'exit(Gem::Version.create(ENV["RUBYGEMS_VERSION"]) > Gem::Version.create(Gem::VERSION))'; \
gem update --system "$RUBYGEMS_VERSION"; \
rm -r /root/.gem/; \
rm -fr /root/.gem/; \
# verify we have no "ruby" packages installed
if dpkg -l | grep -i 'ruby'; then false; fi; \
[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
Expand Down

0 comments on commit e745fb0

Please sign in to comment.