-
Notifications
You must be signed in to change notification settings - Fork 3
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
7 changed files
with
38 additions
and
12 deletions.
There are no files selected for viewing
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
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,3 +1,5 @@ | ||
apk | ||
euo | ||
grep | ||
musl | ||
xeuo |
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,8 +1,12 @@ | ||
FROM ruby:alpine | ||
WORKDIR /spellr | ||
COPY . . | ||
COPY Gemfile spellr.gemspec . | ||
COPY ./lib/spellr/version.rb ./lib/spellr/ | ||
RUN apk add --no-cache make musl-dev gcc && \ | ||
gem install bundler && \ | ||
bundle install --without=development | ||
BUNDLE_WITHOUT=development bundle install | ||
|
||
FROM ruby:alpine | ||
COPY . /spellr | ||
COPY --from=0 /usr/local/bundle /usr/local/bundle | ||
WORKDIR /app | ||
ENTRYPOINT ["/spellr/exe/spellr"] |
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
version_tag=${1-"v$(grep -F VERSION lib/spellr/version.rb | cut -d"'" -f2)"} | ||
if (( ${#version_tag} < 7 )); then | ||
echo "version '$version_tag' doesn't look correct" | ||
exit 1 | ||
fi | ||
|
||
docker build -t robotdana/spellr:$version_tag -t robotdana/spellr:latest . | ||
|
||
# prove it works | ||
[[ v$(docker run -it -v $PWD:/app robotdana/spellr:$version_tag --version | tr -d '\r') == $version_tag ]] |
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,12 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
set -xeuo pipefail | ||
|
||
version_tag=$(git describe --exact-match --abbrev=0) | ||
|
||
docker build -t robotdana/spellr:$version_tag -t robotdana/spellr:latest . | ||
# prove it works | ||
docker run -it -v $PWD:/app robotdana/spellr:$version_tag --version | ||
. ./bin/docker_build $version_tag | ||
|
||
docker push robotdana/spellr:$version_tag | ||
docker push robotdana/spellr:latest |