Last active
August 9, 2021 21:55
-
-
Save jpollack/e256d7c20249c4b164b263a1e78fbeb9 to your computer and use it in GitHub Desktop.
Dockerfile for WWW::Mechanize::Chrome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To build: | |
| # $ docker build -t perl-wmc <Dockerfile-wmc | |
| # | |
| # To run: | |
| # $ docker run -v $(pwd):/wd --network=host -it --rm perl-wmc <perl script> | |
| # | |
| FROM debian:stable-slim AS base | |
| RUN \ | |
| apt-get update \ | |
| && apt-get install -y \ | |
| libimager-perl \ | |
| perl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| FROM base AS build | |
| RUN \ | |
| apt-get update \ | |
| && apt-get install -y \ | |
| build-essential \ | |
| chromium \ | |
| cpanminus \ | |
| libpng-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN cpanm -n -v --self-contained WWW::Mechanize::Chrome | |
| FROM base AS run | |
| COPY --from=build /usr/local /usr/local | |
| WORKDIR /wd | |
| ENTRYPOINT ["/usr/bin/perl"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment