当前位置: 首页 > news >正文

Alpine上安装Docker引擎

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

Docker

Alpine makes a great docker container, because it is so small and optimized to be run in RAM. It might also might make a good controller for several docker containers with enough RAM. I haven't tested this yet Docker's setup is easy to use from command line. Commands can be run from an interactive shell, or through a configuration file called a "Dockerfile". docker.com has excellent walk-throughs on how to run, pull, setup a container, commit an image, and create a configuration file. hub.docker.com is a freemium setup, where the first private repository is free.

Contents

  • 1 Installation
    • 1.1 Docker Compose
  • 2 Example: How to install docker from Arch
  • 3 How to use docker
  • 4 See also

Installation

Run apk add docker to install Docker on Alpine Linux.

The Docker package is in the 'Community' repository, so if the apk add fails with unsatisfiable constraints, you need to edit the /etc/apk/repositories file to add (or uncomment) a line like:

http://dl-cdn.alpinelinux.org/alpine/edge/community

then run apk update to index the repository.


To start the Docker daemon at boot, run:

rc-update add docker boot


Then to start the Docker daemon manually, run:

service docker start

 

Note: On older version of Alpine Linux with older version of docker you'll also need to disable some kernel security flags in order to build images:

sysctl -w kernel.grsecurity.chroot_deny_chmod=0

sysctl -w kernel.grsecurity.chroot_deny_mknod=0

For more information, have a look at the corresponding Github issue.

Anyway, this weakening of security is not necessary to do with Alpine 3.4.x and Docker 1.12 as of August 2016 anymore.

Docker Compose

To install docker-compose, first install pip:

apk add py-pip


Then install docker-compose, run:

pip install docker-compose

Example: How to install docker from Arch

https://wiki.archlinux.org/index.php/Docker

 

How to use docker

The best documentation for how to use Docker and create containers is at the main docker site. Adding anything more to it here would be redundant.

http://docs.docker.com/

if you create an account at docker.com you can browse through other user's images and learn from the syntax in contributor's dockerfiles.

Official Docker image files are denoted by a blue ribon on the website.

See also

  • Creating & Hosting an Alpine Linux Package Repository for Docker Packages

转载于:https://my.oschina.net/u/2306127/blog/1585672

相关文章:

  • glulookat函数
  • oracle执行一条插入语句一直执行
  • SAP QM Batch to Batch的转移过账事务中的Vendor Batch
  • addMusic 和playMusic(AVAudioPlayer)
  • 12:Web及MySQL服务异常监测案例
  • 一个***的自白:年赚两三百万 生活纸醉金迷(3)
  • weex 项目开发(四)项目框架搭建 及 自定义 TabBar 组件
  • 项目规划管理 - 1
  • C# DLL资源文件打包(图片、JS、CSS)[WebResource]
  • 阅读摘要
  • 浅谈SQL Server中的事务日志(三)----在简单恢复模式下日志的角色
  • exchange日常管理之十五:报550错误
  • 12. ZooKeeper之Java客户端API使用—创建会话。
  • 安装office2007 1706错误
  • 36.Linux驱动调试-根据oops定位错误代码行
  • 【140天】尚学堂高淇Java300集视频精华笔记(86-87)
  • 2019年如何成为全栈工程师?
  • gops —— Go 程序诊断分析工具
  • JSDuck 与 AngularJS 融合技巧
  • MySQL QA
  • Python代码面试必读 - Data Structures and Algorithms in Python
  • SSH 免密登录
  • 检测对象或数组
  • 如何邀请好友注册您的网站(模拟百度网盘)
  • 数组的操作
  • 消息队列系列二(IOT中消息队列的应用)
  • 学习笔记DL002:AI、机器学习、表示学习、深度学习,第一次大衰退
  • 《TCP IP 详解卷1:协议》阅读笔记 - 第六章
  • Nginx实现动静分离
  • ​LeetCode解法汇总2808. 使循环数组所有元素相等的最少秒数
  • (C语言)编写程序将一个4×4的数组进行顺时针旋转90度后输出。
  • (附源码)ssm跨平台教学系统 毕业设计 280843
  • (紀錄)[ASP.NET MVC][jQuery]-2 純手工打造屬於自己的 jQuery GridView (含完整程式碼下載)...
  • (切换多语言)vantUI+vue-i18n进行国际化配置及新增没有的语言包
  • (亲测成功)在centos7.5上安装kvm,通过VNC远程连接并创建多台ubuntu虚拟机(ubuntu server版本)...
  • (学习日记)2024.02.29:UCOSIII第二节
  • (转)Linux NTP配置详解 (Network Time Protocol)
  • .bat批处理(六):替换字符串中匹配的子串
  • .gitignore文件---让git自动忽略指定文件
  • .jks文件(JAVA KeyStore)
  • .net 4.0发布后不能正常显示图片问题
  • .NET 读取 JSON格式的数据
  • .NET 命令行参数包含应用程序路径吗?
  • .NET中winform传递参数至Url并获得返回值或文件
  • .vimrc php,修改home目录下的.vimrc文件,vim配置php高亮显示
  • @ 代码随想录算法训练营第8周(C语言)|Day53(动态规划)
  • @RequestBody与@ResponseBody的使用
  • [22]. 括号生成
  • [android] 看博客学习hashCode()和equals()
  • [Android]一个简单使用Handler做Timer的例子
  • [AutoSar]BSW_Com02 PDU详解
  • [Bada开发]初步入口函数介绍
  • [C# 基础知识系列]专题十六:Linq介绍
  • [C#] 如何调用Python脚本程序
  • [CISCN2019 华北赛区 Day1 Web2]ikun