M1 Docker image build & push
- build할 DockerFile 준비
- docker-hadoop-spark Dockerfile
- spark 환경 : jupyterlab, spark-master, spark-worker, mongodb, mysql
- hadoop 환경 : namenode, datanode, resourcemanager, nodemanager, historyserver
1. docker image build
Usage
docker build [OPTIONS] PATH | URL | -
Options
Name, shorthand | Description |
---|
--no-cache | Do not use cache when building the image |
--platform | Set platform if server is multi-platform capable |
--tag , -t | Name and optionally a tag in the 'name:tag' format |
-f | Specify a Dockerfile path inside |
Examples
$docker build --platform linux/amd64 --no-cache -t imok2/hadoop-base:hadoop3.2.2-java8 ./base
$docker build --platform linux/amd64 --no-cache -t imok2/hadoop-datanode:hadoop3.2.2-java8 ./datanode
$docker build --platform linux/amd64 --no-cache -t imok2/hadoop-historyserver:hadoop3.2.2-java8 ./historyserver
$docker build --platform linux/amd64 --no-cache -t imok2/hadoop-namenode:hadoop3.2.2-java8 ./namenode
$docker build --platform linux/amd64 --no-cache -t imok2/hadoop-namenode-sqoop:hadoop3.2.2-sqoop1.4.7 ./namenode-sqoop
$docker build --platform linux/amd64 --no-cache -t imok2/hadoop-nodemanager:hadoop3.2.2-java8 ./nodemanager
$docker build --platform linux/amd64 --no-cache -t imok2/hadoop-resourcemanager:hadoop3.2.2-java8 ./resourcemanager
2. docker push
Usage
docker push [OPTIONS] NAME[:TAG]
Examples
- Push a new image to a registry
$docker login
$docker push imok2/hadoop-base:hadoop3.2.2-java8
3. docker commit
Usage
docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
Examples
$docker commit -m "hadoop-base" hadoop-base imok2/hadoop-base:hadoop3.2.2-java8
4. docker pull
Usage
docker pull [OPTIONS] NAME[:TAG|@DIGEST]
Options
Name, shorthand | Description |
---|
--all-tags , -a | Download all tagged images in the repository |
--platform | Set platform if server is multi-platform capable |
Examples
$docker pull debian