Permalink
Browse files

More descriptive help for Nirum in Docker

  • Loading branch information...
dahlia committed Aug 17, 2016
1 parent 728f455 commit fe2ab445d19e12b5e578cff0995d5df01e799be2
Showing with 34 additions and 5 deletions.
  1. +5 −4 .travis.yml
  2. +2 −1 Dockerfile
  3. +27 −0 docker-entrypoint.sh
View
@@ -5,22 +5,22 @@ matrix:
addons:
apt:
sources: [hvr-ghc, deadsnakes]
packages: [ghc-7.10.3, python3.4, libgmp10, upx-ucl]
packages: [ghc-7.10.3, python3.4, libgmp10, shellcheck, upx-ucl]
- env: GHCVER=7.10.3 RESOLVER=lts-6.12 PY=3.5
addons:
apt:
sources: [hvr-ghc, deadsnakes]
packages: [ghc-7.10.3, python3.5, libgmp10, upx-ucl]
packages: [ghc-7.10.3, python3.5, libgmp10, shellcheck, upx-ucl]
- env: GHCVER=8.0.1 RESOLVER=nightly-2016-08-15 PY=3.4
addons:
apt:
sources: [hvr-ghc, deadsnakes]
packages: [ghc-8.0.1, python3.4, libgmp10, upx-ucl]
packages: [ghc-8.0.1, python3.4, libgmp10, shellcheck, upx-ucl]
- env: GHCVER=8.0.1 RESOLVER=nightly-2016-08-15 PY=3.5
addons:
apt:
sources: [hvr-ghc, deadsnakes]
packages: [ghc-8.0.1, python3.5, libgmp10, upx-ucl]
packages: [ghc-8.0.1, python3.5, libgmp10, shellcheck, upx-ucl]
cache:
directories:
- "$HOME/.stack"
@@ -42,6 +42,7 @@ install:
- if [[ "$PY" = "3.4" ]]; then "$HOME/.pyvenv/bin/pip" install --upgrade typing; fi # FIXME
script:
- source "$HOME/.pyvenv/bin/activate" && stack --no-terminal test
- shellcheck *.sh
before_deploy:
- stack build --no-terminal --copy-bins
- mkdir -p /tmp/nirum-build
View
@@ -10,4 +10,5 @@ RUN cabal sandbox init && \
cabal configure && \
cabal build
ENTRYPOINT ["dist/build/nirum/nirum"]
ENV CMD=dist/build/nirum/nirum
ENTRYPOINT ["./docker-entrypoint.sh"]
View
@@ -0,0 +1,27 @@
#!/bin/bash
if [[ "${#@}" -lt 1 ]]; then
echo "Nirum in Docker"
echo
echo "This image aims you to give a try easily Nirum without any" \
"installation on your system. However, if you consider using" \
"seriously Nirum we recommend you to install Nirum on your system" \
'because using Nirum CLI ("nirum") through "docker run" command is not' \
"that convenient. There are several ways to install Nirum including" \
"statically linked binaries."
echo
echo "Due to the nature of Docker, you need to mount a volume to give" \
"the input source files and find the output object files. " \
'It could be done using -v/--volume option of "docker run" command. ' \
"For example:"
echo
echo ' $ mkdir -p src build'
# shellcheck disable=SC2016
echo ' $ docker run --volume `pwd`/src:/tmp/src '\\
# shellcheck disable=SC2016
echo ' --volume `pwd`/build:/tmp/build '\\
echo ' --rm -it '\\
echo ' spoqa/nirum '\\
echo ' -o /tmp/build /tmp/src'
echo
fi
"$CMD" "${@}"

0 comments on commit fe2ab44

Please sign in to comment.