|
|
11 år sedan | |
|---|---|---|
| .. | ||
| .keep | 11 år sedan | |
| README-content.md | 11 år sedan | |
| README-short.txt | 11 år sedan | |
| README.md | 11 år sedan | |
| license.md | 11 år sedan | |
| logo.png | 11 år sedan | |
Perl is a high-level, general-purpose, interpreted, dynamic programming language. The Perl language borrows features from other programming languages, including C, shell scripting (sh), AWK, and sed.
Dockerfile in your Perl app projectFROM perl:5.20
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
CMD [ "perl", "./your-daemon-or-script.pl" ]
Then, build and run the Docker image:
docker build -t my-perl-app
docker run -it --rm --name my-running-app my-perl-app
For many simple, single file projects, you may find it inconvenient to write a
complete Dockerfile. In such cases, you can run a Perl script by using the
Perl Docker image directly:
docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp perl:5.20 perl your-daemon-or-script.pl