mirror of
https://github.com/docker-library/ruby.git
synced 2022-11-09 11:41:34 -05:00
Merge pull request #223 from infosiftr/onbuild
Finally remove onbuild completely
This commit is contained in:
commit
3f9e4d111f
6 changed files with 7 additions and 71 deletions
|
@ -35,12 +35,6 @@ script:
|
||||||
set -x
|
set -x
|
||||||
travis_retry docker build -t "$image" .
|
travis_retry docker build -t "$image" .
|
||||||
~/official-images/test/run.sh "$image"
|
~/official-images/test/run.sh "$image"
|
||||||
if [ -d onbuild ]; then
|
|
||||||
onbuildFrom="$(awk 'toupper($1) == "FROM" { print $2; exit }' onbuild/Dockerfile)"
|
|
||||||
docker tag "$image" "$onbuildFrom"
|
|
||||||
docker build -t "$image-onbuild" onbuild
|
|
||||||
~/official-images/test/run.sh "$image-onbuild"
|
|
||||||
fi
|
|
||||||
)
|
)
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
FROM ruby:2.3
|
|
||||||
|
|
||||||
# throw errors if Gemfile has been modified since Gemfile.lock
|
|
||||||
RUN bundle config --global frozen 1
|
|
||||||
|
|
||||||
RUN mkdir -p /usr/src/app
|
|
||||||
WORKDIR /usr/src/app
|
|
||||||
|
|
||||||
ONBUILD COPY Gemfile /usr/src/app/
|
|
||||||
ONBUILD COPY Gemfile.lock /usr/src/app/
|
|
||||||
ONBUILD RUN bundle install
|
|
||||||
|
|
||||||
ONBUILD COPY . /usr/src/app
|
|
|
@ -1,13 +0,0 @@
|
||||||
FROM ruby:2.4
|
|
||||||
|
|
||||||
# throw errors if Gemfile has been modified since Gemfile.lock
|
|
||||||
RUN bundle config --global frozen 1
|
|
||||||
|
|
||||||
RUN mkdir -p /usr/src/app
|
|
||||||
WORKDIR /usr/src/app
|
|
||||||
|
|
||||||
ONBUILD COPY Gemfile /usr/src/app/
|
|
||||||
ONBUILD COPY Gemfile.lock /usr/src/app/
|
|
||||||
ONBUILD RUN bundle install
|
|
||||||
|
|
||||||
ONBUILD COPY . /usr/src/app
|
|
|
@ -1,13 +0,0 @@
|
||||||
FROM ruby:%%VERSION%%
|
|
||||||
|
|
||||||
# throw errors if Gemfile has been modified since Gemfile.lock
|
|
||||||
RUN bundle config --global frozen 1
|
|
||||||
|
|
||||||
RUN mkdir -p /usr/src/app
|
|
||||||
WORKDIR /usr/src/app
|
|
||||||
|
|
||||||
ONBUILD COPY Gemfile /usr/src/app/
|
|
||||||
ONBUILD COPY Gemfile.lock /usr/src/app/
|
|
||||||
ONBUILD RUN bundle install
|
|
||||||
|
|
||||||
ONBUILD COPY . /usr/src/app
|
|
|
@ -73,7 +73,7 @@ join() {
|
||||||
|
|
||||||
for version in "${versions[@]}"; do
|
for version in "${versions[@]}"; do
|
||||||
for v in \
|
for v in \
|
||||||
{stretch,jessie}{,/slim,/onbuild} \
|
{stretch,jessie}{,/slim} \
|
||||||
alpine{3.7,3.6} \
|
alpine{3.7,3.6} \
|
||||||
; do
|
; do
|
||||||
dir="$version/$v"
|
dir="$version/$v"
|
||||||
|
@ -89,13 +89,7 @@ for version in "${versions[@]}"; do
|
||||||
|
|
||||||
commit="$(dirCommit "$dir")"
|
commit="$(dirCommit "$dir")"
|
||||||
|
|
||||||
versionDockerfile="$dir/Dockerfile"
|
fullVersion="$(git show "$commit":"$dir/Dockerfile" | awk '$1 == "ENV" && $2 == "RUBY_VERSION" { print $3; exit }')"
|
||||||
versionCommit="$commit"
|
|
||||||
if [ "$variant" = 'onbuild' ]; then
|
|
||||||
versionDockerfile="$(dirname "$dir")/Dockerfile"
|
|
||||||
versionCommit="$(dirCommit "$(dirname "$versionDockerfile")")"
|
|
||||||
fi
|
|
||||||
fullVersion="$(git show "$versionCommit":"$versionDockerfile" | awk '$1 == "ENV" && $2 == "RUBY_VERSION" { print $3; exit }')"
|
|
||||||
|
|
||||||
versionAliases=(
|
versionAliases=(
|
||||||
$fullVersion
|
$fullVersion
|
||||||
|
@ -117,16 +111,8 @@ for version in "${versions[@]}"; do
|
||||||
esac
|
esac
|
||||||
variantAliases=( "${variantAliases[@]//latest-/}" )
|
variantAliases=( "${variantAliases[@]//latest-/}" )
|
||||||
|
|
||||||
case "$v" in
|
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")"
|
||||||
*/onbuild)
|
variantArches="${parentRepoToArches[$variantParent]}"
|
||||||
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$(dirname "$dir")/Dockerfile")"
|
|
||||||
variantArches="${parentRepoToArches[$variantParent]}"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")"
|
|
||||||
variantArches="${parentRepoToArches[$variantParent]}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
cat <<-EOE
|
cat <<-EOE
|
||||||
|
|
11
update.sh
11
update.sh
|
@ -67,7 +67,7 @@ for version in "${versions[@]}"; do
|
||||||
|
|
||||||
for v in \
|
for v in \
|
||||||
alpine{3.6,3.7} \
|
alpine{3.6,3.7} \
|
||||||
{jessie,stretch}{/slim,/onbuild,} \
|
{jessie,stretch}{/slim,} \
|
||||||
; do
|
; do
|
||||||
dir="$version/$v"
|
dir="$version/$v"
|
||||||
variant="$(basename "$v")"
|
variant="$(basename "$v")"
|
||||||
|
@ -75,7 +75,7 @@ for version in "${versions[@]}"; do
|
||||||
[ -d "$dir" ] || continue
|
[ -d "$dir" ] || continue
|
||||||
|
|
||||||
case "$variant" in
|
case "$variant" in
|
||||||
slim|onbuild|windowsservercore) template="$variant"; tag="$(basename "$(dirname "$dir")")" ;;
|
slim|windowsservercore) template="$variant"; tag="$(basename "$(dirname "$dir")")" ;;
|
||||||
alpine*) template='alpine'; tag="${variant#alpine}" ;;
|
alpine*) template='alpine'; tag="${variant#alpine}" ;;
|
||||||
*) template='debian'; tag="$variant" ;;
|
*) template='debian'; tag="$variant" ;;
|
||||||
esac
|
esac
|
||||||
|
@ -97,12 +97,7 @@ for version in "${versions[@]}"; do
|
||||||
-e 's/^(FROM (debian|buildpack-deps|alpine)):.*/\1:'"$tag"'/' \
|
-e 's/^(FROM (debian|buildpack-deps|alpine)):.*/\1:'"$tag"'/' \
|
||||||
"$template" > "$dir/Dockerfile"
|
"$template" > "$dir/Dockerfile"
|
||||||
|
|
||||||
case "$v" in
|
travisEnv='\n - VERSION='"$version VARIANT=$v$travisEnv"
|
||||||
*/onbuild) ;;
|
|
||||||
*)
|
|
||||||
travisEnv='\n - VERSION='"$version VARIANT=$v$travisEnv"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue