Skip to content

Commit

Permalink
Minor updates to Dockerfile
Browse files Browse the repository at this point in the history
 * Add a user to not run as root!
 * Add an example1.m file for simple testing
 * Add ignore files
 * Minor fix for README to not mention Bio-Formats
  • Loading branch information
joshmoore committed Feb 12, 2016
1 parent 41092e8 commit fdb55fc
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.*un~
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.*un~
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ ENV DEBIAN_FRONTEND noninteractive

ADD install.sh install.sh
RUN sh ./install.sh && rm install.sh
RUN useradd -ms /bin/bash octave

USER octave
WORKDIR /home/octave

ADD *.m /home/octave/
VOLUME ["/source"]
WORKDIR /source
CMD ["octave"]
ENTRYPOINT ["octave"]
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Octave

Lightweight development environment for testing the Bio-Formats Octave package
Lightweight development environment for testing Octave scripts.

## Usage

```
$ docker run --rm -it -v $(pwd):/source openmicroscopy/octave
$ docker run --rm -it openmicroscopy/octave -h # Get octave help
$ docker run --rm -it openmicroscopy/octave example1.m arg1 # Run the example file
$ docker run --rm -it -v $(pwd):/source openmicroscopy/octave /source/myfile.m
```

Mount your local source folder to the container and run it inside the container.
7 changes: 7 additions & 0 deletions example1.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /bin/octave -qf
printf ("%s", program_name ());
arg_list = argv ();
for i = 1:nargin
printf (" %s", arg_list{i});
endfor
printf ("\n");

0 comments on commit fdb55fc

Please sign in to comment.