Download the statis binary archive. Go to http://download.docker.com/linux/static/stabl
(or change stable to edge or test), choose your hardware platform, and download the .taz file relating to the version of Docker CE you want to install.
Extract the archive using the tar utility. The dockerd and docker binaries are ectracted.
tar zxvf /path/to/<FILE>.tar.gz
Optional: Move the biaries to a directory on your executable path, such as /usr/bin/ . If you skip this step, you must provide the path to the executable when you invoke docker or dockerd commands.
sudo cp docker/* /usr/bin/
Start the Docker daremon:
sudo dockerd &
If you need to start the daemon with additional options, modify the above command accordingly or create and edit the file /etc/docker/daemon.json to add the custom configuration options.
DockerHub sreach oracle
warning: Step1 is online , Step2 is offline install docker
By default, the password verification is disable(password never expired)
Connect database with following setting:
hostname: localhost
port: 49161
sid: xe
username: system
password: oracle
Step 3 copy the image with other PC
you can exec the Step1 and then save the image with other PC, copy into the target PC, save the image
docker images ## show the images list
docker save -o <save /path/file name.tar> <image name>
eg : docker save -o /opt/oracle.tar wnameless/-oracle-xe-11g:v1
Offline Installation Docker
download docker .tar.gz and follow the doucment
If you need to start the daemon with additional options, modify the above command accordingly or create and edit the file /etc/docker/daemon.json to add the custom configuration options.
DockerHub sreach oracle
Step 1 docker pull
Just being bored like this, here is "offline install "
Step 2 cloning the project wnameless/oracle-xe-11g on github
或者(参考dragonbest520这位大佬的回答)
By default, the password verification is disable(password never expired) Connect database with following setting:
Step 3 copy the image with other PC
you can exec the Step1 and then save the image with other PC, copy into the target PC, save the image
Target PC
Docker modify the default path
在硬盘上开一个100g大小的空间,并格式化,参考命令:mkfs.ext4 /dev/sda2 ,然后挂载。如果不明白如何分区格式化并且挂载,请看考这里。这篇文章可以说是我见过关于初级磁盘管理最好的一篇文章了。 挂载之后复制文件夹/var/lib/docker/ 到挂载的位置,再软连接回去。(然后docker images就可以持久化放到硬盘里面了重启不会丢失)。参考操作如下:
查看docker的基本信息
更改安装路径
停止docker服务
备份原目录
或者
重启docker服务
查看docker信息
Docker 持久化
容器中数据持久化主要有两种方式:
数据卷
数据卷是一个可供一个或多个容器使用的特殊目录,可以绕过UFS(Unix File System)。
创建数据卷
示例:
执行如下命令即可查看容器构造的详情:
由测试可知
删除数据卷
数据卷是被设计来持久化数据的,因此,删除容器并不会删除数据卷。如果想要在删除容器时同时删除数据卷,可使用如下命令
这样既可在删除容器的同时也将数据卷删除。
挂载宿主机目录作为数据卷
这样既可将宿主机的/host-dir路径加载到容器的/container-dir中。
需要注意的是:
TIPS
挂载宿主机文件作为数据卷
指定权限
示例
这样,在容器中就只能读取/container-dir中的文件,而不能修改了。
数据卷容器
创建数据卷容器
在其他容器中使用 -volumes-from 来挂载 nginx-volume 容器中的数据卷。
这样
Tips / Reference: docker, 离线安装, centos, ubuntu, linux
简单离线安装docker
从二进制文件安装Docker CE
Docker 修改默认存储位置
CoreOS 在 PC 上快速安装方法指南
Preparing the disks
docker wnameless/oracle-xe-11g
github wnameless
docker save load export import的区别
Docker系列教程14-Docker数据持久化