Skip to content

itk-dev/perl-docker-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perl docker setup

This comes from the perl template repository and should be updated when used in a project

Local setup

If one is not using itk-devs wrapper script. One simple needs the following steps to run it without.

docker network create frontend
docker compose up -d

To access the application, use the command below which will return host and port number.

docker compose port nginx 8080

Extend the default docker image

To install new perl libraries directly in the docker image. Create docker-compose.override.yml and docker-compose.server.override.yml (with the same content). Add the following to the files, thereby switching over to building a new container image for the project.

The docker-compose.override.yml will automatically be used by docker compose in local development. The server override needs to be added to the .env.docker.local file one the hosting server to include the override.

services:
  perl:
    build:
      dockerfile: Dockerfile
      context: ./docker/app

Create the new Docker image definition file.

mkdir .docker/app
touch .docker/app/Dockerfile

Extend from the main perl image an add the required libraries or other packages required for the project.

FROM itkdev/perl

RUN DEBIAN_FRONTEND=noninteractive \
    apt-get update \
    apt-get install -y \
    libcrypt-eksblowfish-perl \
    libcrypt-urandom-perl \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Running with the extended image.

This will ensure that the image is build everytime you run up, it should also be picked up when running the command without build. This just makes it explicit.

docker composer up --build -d

You can also run docker compose build --no-cache to force rebuild the image.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published