-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
28 additions
and
38 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
FROM minidocks/base:3.8 | ||
ARG version=2.5 | ||
|
||
FROM minidocks/base:3.7 AS v2.4 | ||
|
||
FROM minidocks/base AS v2.5 | ||
|
||
FROM v${version} | ||
LABEL maintainer="Martin Hasoň <[email protected]>" | ||
|
||
# install things globally, for great justice and don't create ".bundle" in all our apps | ||
|
@@ -15,10 +21,8 @@ RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME" && mkdir -p "$BUNDLE_CACHE_PAT | |
|
||
COPY rootfs / | ||
|
||
RUN apk --update add 'ruby<2.6' ruby-irb \ | ||
RUN apk --update add ruby ruby-irb \ | ||
&& gem install bundler \ | ||
&& clean | ||
|
||
CMD [ "irb" ] | ||
|
||
# see https://github.com/docker-library/ruby/blob/master/2.5/alpine3.8/Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
image="${namespace:-minidocks}/ruby" | ||
versions=" | ||
2.4;2.4 | ||
2.5;2.5 | ||
latest;2.5 | ||
" | ||
|
||
build() { | ||
docker build $docker_opts --build-arg version="$2" -t "$image:$1" "$(dirname $0)" | ||
} | ||
|
||
case "$1" in | ||
--versions) echo "$versions" | awk 'NF' | cut -d';' -f1;; | ||
'') echo "$versions" | grep -v "^$" | while read -r version; do IFS=';'; build $version; done;; | ||
*) args="$(echo "$versions" | grep -E "^$1(;|$)")"; if [ -n "$args" ]; then IFS=';'; build $args; else echo "Version $1 does not exist." >/dev/stderr; exit 1; fi | ||
esac |