docker简易实践

实验环境

操作系统:deepin 15.4

安装步骤

1、安装docker

sudo apt-get install docker.io

2、启动docker服务

sudo service docker restart

3、运行hello world

sudo docker run hello-world

出现以下信息则代表成功

Hello from Docker!
This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal. To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID:
https://cloud.docker.com/ For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/

以上若执行出现以下错误,请在命令前加上sudo

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

部署LAMP环境

由于下载外部外国镜像需要很久,这里推荐网易的镜像

附链接:https://c.163.com/hub#/m/home/

此处选择:https://c.163.com/hub#/m/repository/?repoId=3179

通过命令,享受飞一样的感觉

sudo docker pull hub.c.163.com/public/lamp:latest

发现pull完之后即可运行此docker

sudo docker run -d -p 8080:80 -p 8888:3306 hub.c.163.com/public/lamp:latest

此时通过浏览器访问:127.0.0.1:8080,即可访问得到PHP解析的网页

另附

进入docker查看文件:如何进入Docker容器

文件传送门:Docker cp 命令

若PHP无法执行mysql或者mysqli请执行

sudo apt-get install php5-mysql
或者
sudo apt-get install php5-mysqli

docker简易实践的更多相关文章

  1. 【docker简易笔记】docker基础信息的分享

    docker 使用的频率越来越高,所以在后续的一些博客中会分享一些docker的安装和使用. 一.docker介绍   "Docker 最初是 dotCloud 公司创始人 Solomon ...

  2. 【实战】Docker入门实践二:Docker服务基本操作 和 测试Hello World

    操作环境 操作系统:CentOS7.2 内存:1GB CPU:2核 Docker服务常用命令 docker服务操作命令如下 service docker start #启动服务 service doc ...

  3. 基于OVS的VLAN虚拟化简易实践方案

    基于OVS的VLAN虚拟化简易实践方案 前言 本实验基于ovs的vlan流表匹配,根据端口进行vlan标签插入.手工配置ovs,使其具有vlan虚拟化方案. 实验拓扑 ---- ---- | h1 | ...

  4. 这是一次 docker 入门实践

    前言 其实接触 docker 也有一段时间了,但是一直没有做下总结,现在网上关于 docker 的介绍也有很多了,本着好记性不如烂笔头的原则,还是自己再记录一波吧. 实现目标 安装 docker ce ...

  5. docker最佳实践-----美团点评的分享

    美团点评容器平台简介 本文介绍美团点评的Docker容器集群管理平台(以下简称“容器平台”).该平台始于2015年,是基于美团云的基础架构和组件而开发的Docker容器集群管理平台.目前该平台为美团点 ...

  6. 项目中docker swarm实践

    docker swarm 集群服务通信 前置要求 服务需要在同一个docker swarm集群中 服务需要处于同一个overlay网络上 服务需要暴露容器端口 有2个以上服务名不同的服务 服务部署流程 ...

  7. CI Weekly #9 | 揭秘阿里 Docker 化实践之路

    2017年悄然而至,对 flow.ci 你有什么新的期待呢?新的一年,flow.ci会越来越强大好用,希望继续得到你的支持与反馈.最近,我们做了如下的「功能优化」与「问题修复」,看看有没有你想要的: ...

  8. CI Weekly #17 | flow.ci 支持 Java 构建以及 Docker/DevOps 实践分享

    这周一,我们迫不及待写下了最新的 changelog -- 项目语言新增「Java」.创建 Java 项目工作流和其它语言项目配置很相似,flow.ci 提供了默认的 Java 项目构建流程模版,快去 ...

  9. Docker 入门实践

    欢迎大家前往腾讯云技术社区,获取更多腾讯海量技术实践干货哦~ 作者:张戈 导语 本文从新手视角记录了一个实际的Dokcer应用场景从创建.上传直到部署的详细过程,并简单的介绍了腾讯云容器服务的使用方法 ...

随机推荐

  1. AndroidStudio编译error:app:validateReleaseSigning'Keystore file not found for signing config 'release

    使用AndroidStudio编译时提示error: Error:Execution failed for task ‘:app:validateReleaseSigning’. > Keyst ...

  2. apache配置文件:http.conf配置详解

    Apache的配置文件http.conf参数含义详解 Apache的配置由httpd.conf文件配置,因此下面的配置指令都是在httpd.conf文件中修改.主站点的配置(基本配置) (1) 基本配 ...

  3. vagrant特性——基于docker开发环境(docker和vagrant的结合)-1-基本使用

    Docker vagrant提供了使用Docker作为provider(其他的provider有virtualBox.VMware\hyper-V等)的开箱即用支持.这允许你的开发环境由Docker容 ...

  4. RMAN常用命令汇总!

    进入RMAN:$ rman target sys/oracle@orcl   --远程连接到rman$ rman target sys/oracle@orcl @backup_db.ram   --远 ...

  5. java.util.zip.ZipException: duplicate entry(重复依赖多版本的类库)

    同步SVN仓库中的代码,更新后,运行项目,出现如下错误: com.android.build.api.transform.TransformException: java.util.zip.ZipEx ...

  6. Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs

    在部署工程时,没有加入javax.servlet-api.jar(3.0.1) 和 standard.jar(1.1.2)两个jar包导致此问题. 另外,如果原来容器中有javax.servlet-a ...

  7. visual studio 插件

    一:VS10x Code Map(打开后台cs文件,插件列出了所有的字段.方法,方便当代码行多的时候查找,提升工作效率) 1:下载 https://marketplace.visualstudio.c ...

  8. 关于OpenCV2.4.9在VS2012上的配置

    今天写着篇文章是由于自从上次电脑换硬盘今天再次安装OpenCV又遇到了一些问题,最后终于搞定,,,,用的版本是2.4.9,,,因为第一次配置用3.0的没有配置成功,而2.4.9的配置成功. 首先当然是 ...

  9. day73

    今日内容:  1基于双下划线的跨表查询   套路一样,用__跨表   -一对多    -多对多 # 北京出版社出版的所有图书 res = models.Publish.objects.filter(n ...

  10. odoo tree视图 当页不弹窗显示方法

    <xpath expr="//tree" position="attributes"> <attribute name='editable'& ...