1
点击(此处)折叠或打开下载 https://repo.openeuler.org/openEuler-20.03-LTS/docker_img/aarch64/openEuler-docker.aarch64.tar.xz
2 先导入镜像
docker -i openEuler-docker.aarch64.tar.xz
这个镜像没有几乎没有任何命令,vi和vim都没有,只好映射openEuler_aarch64.repo文件
现在/vm目录下建立openEuler_aarch64.repo
内容如下
-
#Copyright (c) [2019] Huawei Technologies Co., Ltd.
-
#generic-repos is licensed under the Mulan PSL v1.
-
#You can use this software according to the terms and conditions of the Mulan PSL v1.
-
#You may obtain a copy of Mulan PSL v1 at:
-
# http://license.coscl.org.cn/MulanPSL
-
#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
-
#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
-
#PURPOSE.
-
#See the Mulan PSL v1 for more details.
-
[OS]
-
name=OS
-
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/OS/$basearch/
-
enabled=1
-
gpgcheck=1
-
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler
-
-
[everything]
-
name=everything
-
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/everything/$basearch/
-
enabled=1
-
gpgcheck=1
-
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/everything/$basearch/RPM-GPG-KEY-openEuler
-
-
[EPOL]
-
name=EPOL
-
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/EPOL/$basearch/
-
enabled=1
-
gpgcheck=1
-
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler
-
-
[debuginfo]
-
name=debuginfo
-
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/debuginfo/$basearch/
-
enabled=1
-
gpgcheck=1
-
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/debuginfo/$basearch/RPM-GPG-KEY-openEuler
-
-
[source]
-
name=source
-
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/source/
-
enabled=1
-
gpgcheck=1
-
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/source/RPM-GPG-KEY-openEuler
-
-
[update]
-
name=update
-
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/update/$basearch/
-
enabled=0
-
gpgcheck=1
-
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler
3 使用一下命令创建容器
docker run -d --name taishang -it -d --privileged=true -p 10022:22 -p 10443:443 -v /vm/taishan:/etc/yum.repos.d:rw openeuler-20.03-lts /bin/bash
启动容器
docker start taishang
进入容器
docker exec -it taishang /bin/bash
安装vim
yum install vim
安装后,vim /etc/bashrc
屏蔽 #export TMOUT=300
停止容器taishang,启动容器taishang
docker stop taishang
docker start taishang
输入 echo $TMOUT
为了安装mysql,必须要useradd命令,需要安装
yum install shadow-utils
然后运行 which useradd
显示
/usr/sbin/useradd
4 安装mysql yum install mysql
5 安装openjdk
yum install java
阅读(4722) | 评论(0) | 转发(0) |