...
- Modify Dockerfile file using any editor (e.g. vim):
1 # Create softwareserver for polyglot.
2 FROM ncsa/polyglot-server:latest
3 MAINTAINER Rob Kooper <kooper@illinois.edu>
4
5 USER root
6 # - install requirements
7 # - enable shellscripts to be scanned
8 # - enable imagemagick conversion by adding to .aliases.txt
9 RUN apt-get update && apt-get -y install imagemagick && \
10 /bin/sed -i -e 's/^\([^#]*Scripts=\)/#\1/' -e 's/^#\(ShellScripts=\)/\1/' /home/polyglot/polyglot/SoftwareServer.conf && \
11 echo "ImageMagick" > /home/polyglot/polyglot/scripts/sh/.aliases.txt
12
13 # copy convert file to scripts/sh folder in container
14 # this is done to keep cache so you can debug script easily
15 COPY ImageMagick_convert.sh /home/polyglot/polyglot/scripts/sh/
16
17 # back to polyglot
18 USER polyglot
19 CMD ["softwareserver"]
Line 11: Add MyTool to the .aliases.txt
Modify:
echo "ImageMagick" > /home/polyglot/polyglot/scripts/sh/.aliases.txt
...
To
echo "MyTool" > /home/polyglot/polyglot/scripts/sh/.aliases.txt
...
Line 15: Copy MyTool_convert.sh script to the script directory
COPY MyTool_convert.sh /home/polyglot/polyglot/scripts/sh/
...
Save the file
To build, launch and test the new converter, run the following command:
...