Skip to content

Commit e745fb0

Browse files
author
Phileas Lebada
committed
Fix builds for kaniko-users
GoogleContainerTools/kaniko#1246
1 parent 265702f commit e745fb0

File tree

3 files changed

+18
-19
lines changed

3 files changed

+18
-19
lines changed

Dockerfile-alpine.template

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ RUN apk add --no-cache \
66
gmp-dev
77

88
# skip installing gem documentation
9-
RUN set -eux; \
10-
mkdir -p /usr/local/etc; \
11-
{ \
12-
echo 'install: --no-document'; \
13-
echo 'update: --no-document'; \
14-
} >> /usr/local/etc/gemrc
9+
RUN mkdir -p /usr/local/etc; \
10+
printf '%s\n' \
11+
'install: --no-document' \
12+
'update: --no-document' \
13+
>> /usr/local/etc/gemrc
1514

1615
ENV LANG C.UTF-8
1716
ENV RUBY_MAJOR %%VERSION%%
@@ -71,11 +70,11 @@ RUN apk add --no-cache --virtual .ruby-builddeps \
7170
\
7271
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
7372
# warning: Insecure world writable dir
74-
{ \
73+
( \
7574
echo '#define ENABLE_PATH_CHECK 0'; \
7675
echo; \
7776
cat file.c; \
78-
} > file.c.new; \
77+
) > file.c.new; \
7978
mv file.c.new file.c; \
8079
\
8180
autoconf; \

Dockerfile-debian.template

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ SHELL ["/bin/bash", "-eux", "-c"]
44

55
# skip installing gem documentation
66
RUN mkdir -p /usr/local/etc; \
7-
{ \
8-
echo 'install: --no-document'; \
9-
echo 'update: --no-document'; \
10-
} >> /usr/local/etc/gemrc
7+
printf '%s\n' \
8+
'install: --no-document' \
9+
'update: --no-document' \
10+
>> /usr/local/etc/gemrc
1111

1212
ENV LANG C.UTF-8
1313
ENV RUBY_MAJOR %%VERSION%%
@@ -38,11 +38,11 @@ RUN savedAptMark="$(apt-mark showmanual)"; \
3838
\
3939
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
4040
# warning: Insecure world writable dir
41-
{ \
41+
( \
4242
echo '#define ENABLE_PATH_CHECK 0'; \
4343
echo; \
4444
cat file.c; \
45-
} > file.c.new; \
45+
) > file.c.new; \
4646
mv file.c.new file.c; \
4747
\
4848
autoconf; \

Dockerfile-slim.template

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ RUN apt-get update; \
1717

1818
# skip installing gem documentation
1919
RUN mkdir -p /usr/local/etc; \
20-
{ \
21-
echo 'install: --no-document'; \
22-
echo 'update: --no-document'; \
23-
} >> /usr/local/etc/gemrc
20+
printf '%s\n' \
21+
'install: --no-document' \
22+
'update: --no-document' \
23+
>> /usr/local/etc/gemrc
2424

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

0 commit comments

Comments
 (0)