How to install jupyter in docker on centos and open ports

How to install jupyter in docker on centos and open ports

Install jupyter

pip install jupyter

Write a script to run:

#!/bin/bash
# run_jupyter.sh
jupyter notebook --no-browser --ip 0.0.0.0 --port 8888 --allow-root > .log 2>&1 &

You can add this script to run at startup

Docker port mapping

First submit the container with jupyter installed

docker commit -a 'author' -m "add jupyter" container name ubuntu:jupyter

Create a container with a new image

docker run -itd --name jupyter ubuntu:jupyter -p 80:8888 bash

Open the host firewall

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-port
firewall-cmd --query-port=80/tcp

Access the host machine using a browser

insert image description here

So my development environment is like this hahaha

insert image description here

This is the end of this article on how to install jupyter in docker on centos and open ports. For more information about installing jupyter on docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to install jupyter in docker on centos and open ports
  • How to configure Jupyter notebook in Docker container
  • Solution to the problem that Docker container cannot access Jupyter
  • A brief discussion on how to run Tensorboard and Jupyter on Docker

<<:  What are mysql dirty pages?

>>:  Detailed explanation of some commonly used font-size font units and line-height in CSS

Recommend

Linux uses iftop to monitor network card traffic in real time

Linux uses iftop to monitor the traffic of the ne...

Tutorial on building svn server with docker

SVN is the abbreviation of subversion, an open so...

VMware 15.5 version installation Windows_Server_2008_R2 system tutorial diagram

1. Create a new virtual machine from VMware 15.5 ...

How to build Nginx image server with Docker

Preface In general development, images are upload...

Introduction to common commands and shortcut keys in Linux

Table of contents 1 System Introduction 2 System ...

Detailed graphic explanation of MySql5.7.18 character set configuration

Background: A long time ago (2017.6.5, the articl...

Native JS to implement the aircraft war game

This article example shares the specific code of ...

Basic operations of mysql learning notes table

Create Table create table table name create table...

Solution for Nginx installation without generating sbin directory

Error description: 1. After installing Nginx (1.1...

Implementation of mysql decimal data type conversion

Recently, I encountered a database with the follo...

Example of implementing todo application with Vue

background First of all, I would like to state th...

Simple usage of MySQL temporary tables

MySQL temporary tables are very useful when we ne...

Tutorial on how to connect and use MySQL 8.0 in IDEA's Maven project

First, let's take a look at my basic developm...