Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve examples in README #21

Merged
merged 5 commits into from
Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
sudo: enabled
services:
- docker
before_script:
- wget -qO- 'https://github.com/tianon/pgp-happy-eyeballs/raw/master/hack-my-builds.sh' | bash
script:
- docker build -t rakudo-star .
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN buildDeps=' \
\
&& curl -fsSL ${url}.asc -o ${tmpdir}/rakudo.tar.gz.asc \
&& curl -fsSL $url -o ${tmpdir}/rakudo.tar.gz \
&& gpg --keyserver $keyserver --recv-keys $keyfp \
&& gpg --batch --keyserver $keyserver --recv-keys $keyfp \
&& gpg --batch --verify ${tmpdir}/rakudo.tar.gz.asc ${tmpdir}/rakudo.tar.gz \
\
&& tar xzf ${tmpdir}/rakudo.tar.gz --strip-components=1 -C ${tmpdir}/rakudo \
Expand Down
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,19 @@ you use the default version.

# Usage

Simply running a container with the image will launch a Perl 6 REPL:
Running a short-term foreground process with the image will launch a Perl 6 REPL:

$ docker run -it rakudo-star
$ docker run --rm -it rakudo-star
> say 'Hello, Perl!'
Hello, Perl!

You can also provide perl6 command line switches to `docker run`:
You can also provide perl6 command line switches to a temporary container:

$ docker run -it rakudo-star perl6 -e 'say "Hello!"'
$ docker run --rm rakudo-star perl6 -e 'say "Hello!"'

In addition, you can mount a directory from the host within a container:
In addition, you can run a script located in the current folder:

$ docker run -it -v $HOME/my_p6_projects/:/mount_location/ rakudo-star /bin/bash

Then, you can run your scripts from inside the container:

# perl6 /mount_location/my_p6_script.p6
$ docker run --rm -v "$(pwd):/script" rakudo-star perl6 /script/my_p6_script.p6

# Contributing/Getting Help

Expand Down