mirror of
https://github.com/docker-library/ruby.git
synced 2022-11-09 11:41:34 -05:00
Finally remove onbuild completely
This commit is contained in:
parent
eca972d167
commit
b9e495c8e4
6 changed files with 7 additions and 71 deletions
|
@ -35,12 +35,6 @@ script:
|
|||
set -x
|
||||
travis_retry docker build -t "$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:
|
||||
|
|
|
@ -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 v in \
|
||||
{stretch,jessie}{,/slim,/onbuild} \
|
||||
{stretch,jessie}{,/slim} \
|
||||
alpine{3.7,3.6} \
|
||||
; do
|
||||
dir="$version/$v"
|
||||
|
@ -89,13 +89,7 @@ for version in "${versions[@]}"; do
|
|||
|
||||
commit="$(dirCommit "$dir")"
|
||||
|
||||
versionDockerfile="$dir/Dockerfile"
|
||||
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 }')"
|
||||
fullVersion="$(git show "$commit":"$dir/Dockerfile" | awk '$1 == "ENV" && $2 == "RUBY_VERSION" { print $3; exit }')"
|
||||
|
||||
versionAliases=(
|
||||
$fullVersion
|
||||
|
@ -117,16 +111,8 @@ for version in "${versions[@]}"; do
|
|||
esac
|
||||
variantAliases=( "${variantAliases[@]//latest-/}" )
|
||||
|
||||
case "$v" in
|
||||
*/onbuild)
|
||||
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
|
||||
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")"
|
||||
variantArches="${parentRepoToArches[$variantParent]}"
|
||||
|
||||
echo
|
||||
cat <<-EOE
|
||||
|
|
11
update.sh
11
update.sh
|
@ -67,7 +67,7 @@ for version in "${versions[@]}"; do
|
|||
|
||||
for v in \
|
||||
alpine{3.6,3.7} \
|
||||
{jessie,stretch}{/slim,/onbuild,} \
|
||||
{jessie,stretch}{/slim,} \
|
||||
; do
|
||||
dir="$version/$v"
|
||||
variant="$(basename "$v")"
|
||||
|
@ -75,7 +75,7 @@ for version in "${versions[@]}"; do
|
|||
[ -d "$dir" ] || continue
|
||||
|
||||
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}" ;;
|
||||
*) template='debian'; tag="$variant" ;;
|
||||
esac
|
||||
|
@ -97,12 +97,7 @@ for version in "${versions[@]}"; do
|
|||
-e 's/^(FROM (debian|buildpack-deps|alpine)):.*/\1:'"$tag"'/' \
|
||||
"$template" > "$dir/Dockerfile"
|
||||
|
||||
case "$v" in
|
||||
*/onbuild) ;;
|
||||
*)
|
||||
travisEnv='\n - VERSION='"$version VARIANT=$v$travisEnv"
|
||||
;;
|
||||
esac
|
||||
travisEnv='\n - VERSION='"$version VARIANT=$v$travisEnv"
|
||||
done
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue