Perl-Types

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

$ docker build -t app:dev -f docker/Dockerfile.app .

# use `docker` to run local Docker application image
$ docker run -it --rm app:dev

# use `docker` to run local Docker application image with one-off command, in this case `prove` to run Perl tests
$ docker run -it --rm app:dev prove -Ilib -r t

# use `docker` to run local Docker application image in Live Developer Mode;
# mount the repository from the host OS's current directory into the '/app' Docker working directory,
# thereby overlaying the copy of the repository that was baked into the Docker application image
# with the latest copy of the respository from the host operating system;
# this allows live edits on the host OS to be immediately reflected within the Docker application
$ docker run -it --rm -v "$PWD:/app" -e PERL_VERBOSE=1 -e PERL_DEBUG=1 -e PERL_WARNINGS=1 app:dev

# use `docker compose` to build local Docker images
$ docker compose build base app

# use `docker compose` to run local Docker application image in Live Developer Mode via settings in 'docker-compose.yml'
$ docker compose run --rm app

docker-compose.yml  view on Meta::CPAN

    build:
      context: .
      dockerfile: docker/Dockerfile.app
      args:
        BASE_IMAGE: base:dev     # uses the image built by the "base" service above
    image: app:dev               # tag produced by this build
    working_dir: /app            # match 'Dockerfile' working directory

    # LIVE DEVELOPER MODE:
    # mount the repository from the host OS's current directory into the '/app' Docker working directory,
    # thereby overlaying the copy of the repository that was baked into the Docker application image
    # with the latest copy of the respository from the host operating system;
    # this allows live edits on the host OS to be immediately reflected within the Docker application
    volumes:
      - ./:/app

    # the following 3 environmental variables are used by Perl::Config & Perl::Types & Perl::Compiler,
    # feel free to use them in your own code as well;
    # these should not be permanently hard-coded into the 'Dockerfile' like "PERL5LIB" & "PATH",
    # so we can disable them when decreased verbosity is desired
    environment:



( run in 2.773 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )