Docker

From RAJ INFO
Revision as of 08:43, 10 December 2024 by Raj (talk | contribs) (Creating a Docker)
Jump to navigation Jump to search

Pull and create a container

docker pull arunindiran/biomass:V4
docker run --name biomass -p 8501:8501 arunindiran/biomass:V4
docker run --name biomass -p 8501:8501 -p 8099:8001 arunindiran/biomass:V4

Push to Docker

docker login
docker push curioadmin/biomass:V5

Making changes in the Docker

docker commit <ContainerID> <imageid:tag>


Creating a Docker

  • Create an application list to a text file
apt list
pip freeze 
conda freeze >text file
  • Create a "Dockerfile" for installation
FROM ubuntu:24.04 # Installation of OS
RUN mkdir /test
WORKDIR /test
COPY list.txt .  # Application list

RUN apt update -y
RUN apt install python3-pip -y
RUN pip install --break-system-packages -r list.txt
RUN pip install --break-system-packages jupyter

EXPOSE 8005 8006 8501  # Expose the ports that are to be opened

ENTRYPOINT ["jupyter-notebook","--port=8501"]  # First service to be run
  • Build the doker Image
docker build -t test:V1 .  # Build the docker image