This repository provides a Dockerfile to set up a Jupyter Notebook environment with a Perl 5 kernel. It allows you to run and interact with Perl 5.38 code within a Jupyter Notebook interface.
You can either build the Docker image from the provided Dockerfile or pull the pre-built image from Docker Hub.
- Jupyter Notebook: A web-based interactive development environment.
- Perl 5.38 Kernel: Run Perl scripts and commands within Jupyter notebooks.
- Dockerized: Encapsulates the entire setup in a Docker container, making it easy to use and portable.
- Docker installed on your system.
- Your user must have permissions
You can pull a pre-built Docker image from Docker Hub, avoiding the need to build the image locally.
-
Pull the image:
docker pull deptmetagenom/jupyter-perl-docker
-
Run the container:
docker run -p 8888:8888 deptmetagenom/jupyter-perl-docker
-
Access Jupyter Notebook:
Open a web browser and go to the following URL:
http://localhost:8888
You will be prompted to enter a token, which will be displayed in the terminal when the container starts.
-
Using the Perl Kernel:
In the Jupyter interface, create a new notebook and select the Perl 5.38 kernel from the "Kernel" dropdown. You can now write and run Perl code directly within Jupyter.
If you prefer to build the Docker image yourself from the Dockerfile in this repository, follow these steps:
-
Clone this repository:
git clone https://github.com/yourusername/jupyter-perl5-docker.git cd jupyter-perl5-docker
-
Build the Docker image:
docker build -t jupyter-perl5-notebook .
-
Run the container:
docker run -p 8888:8888 jupyter-perl5-notebook
-
Access Jupyter Notebook:
Open a web browser and go to the following URL:
http://localhost:8888
You will be prompted to enter a token, which will be displayed in the terminal when the container starts.
-
Using the Perl Kernel:
In the Jupyter interface, create a new notebook and select the Perl 5.38 kernel from the "Kernel" dropdown. You can now write and run Perl code directly within Jupyter.
If you want to customize the kernel.json
file or modify any aspect of the environment, make the necessary changes to the files and rebuild the Docker image.
- The
kernel.json
file, which is required for the Perl 5 kernel for Jupyter to work, is located at/usr/local/share/jupyter/kernels/perl5/kernel.json
within the container. - To copy a modified
kernel.json
file, make sure it's in the same directory as the Dockerfile and rebuild the image.
To stop the running container, press CTRL+C
in the terminal where it's running, or find the container ID and stop it with:
docker ps
docker stop <container_id>
If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.