dockeralpine的简单介绍
本篇文章给大家谈谈dockeralpine,以及对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。
本文目录一览:
- 1、Docker下alpine镜像安装Latex工具心得
- 2、Docker 基础镜像
- 3、Termux Qemu Alpine Docker
- 4、Docker Alpine镜像 安装php7
- 5、alpine docker安装openvpn遇到的问题
Docker下alpine镜像安装Latex工具心得
在近期的项目中,需要在 Confluence 平台内搭建Latex工具,来实现数学公式的编写和渲染等功能。不拆斗同于其他基于java的封闭plugin包, Confluence 的Latex-plugin是需要依赖server端本地的latex和dvipng工具才能进行页面内的渲染的。如果是通常情况下,这个问题很好解决,但是实验室的 Confluence 是通过docker images直接起的,并且这个image的基底kernel是alpine这个可以称得上是裸kernel的发行版。所以通常的安装没办法进行了,于是只能动手编译撸一遍。
因为confluence容器所依托的linux基底是没御孙alpine,一个非常轻量几乎没有任何依赖和包的linux裸核心,所以在alpine上配置latex和枯链dvipng会比较麻烦一点。
[img]Docker 基础镜像
buster 现在更常见,未来 bullseye 会越来越多。 一般情况下,其它几个都不是我们的第一选择。
Alpine 是众多 Linux 发行版中的一员,和 CentOS、Ubuntu、Archlinux 之类一样,只是一个发行版的名字,号称小巧安全,有自己的包管理工具 apk 。
Alpine 非常非常小:100M vs 5M !
官方 Alpine 镜像的文档:
但是 Alpine 的小是有代价的,在不轻易间可能会给你造成麻烦!
Alpine Linux 除了插件了一些不必要的软件之外,特别重要的是,它使用了 musl libc 代替了大名鼎鼎的 glibc 。
musl libc 含有和 glibc 一样的标准功罩芦液能,但是问题是 glibc 还有标准功能之外的扩展功能,由于 glibc 的历哗茄史地位和市场占有率,导致 glibc 的扩展功能实际上的使用也很广泛!有不少软件的编译、安装和运行都用到了 glibc 的扩展功能,因此这些软件在使用了 glibc 的基础颈项上就能运行,在使用了 musl libc 的 alpine 上则不行。
另外,Alpine 并没有像 Red Hat 或 Canonical 之类的大公司为其提供维护支持,软件包的数量也比这些发行版少很多(如果只看开箱即用的默认软件仓库,Alpine 只有 10000 个软件包,而 Ubuntu、Debian 和 Fedora 的软件包数量均大于 50000。)
如果实在不想折腾,可以选择一个折衷的镜像 xxx:slim。slim 镜像一般都基于 Debian 和 glibc,删物物除了许多非必需的软件包,优化了体积。如果构建过程中需要编译器,那么 slim 镜像不适合,除此之外大多数情况下还是可以使用 slim 作为基础镜像的。
Termux Qemu Alpine Docker
title: "蚂昌Termux Qemu Alpine Docker"
date: 2021-02-19T21:45:27+08:00
draft: true
tags: ['termux','alpine','qmeu','docker']
author: "dadigang"
author_cn: "大地缸"裂袭
personal: " "
This is a setup for runing docker on android, by the means of Termux, running alpine in qemu and them enabling docker on the Alpine.
This was only tested on Samsung S10e.
And start it.
First step was to setup VNC and Fluxbox, which is quite easy following termux VNC guide :
Enable x11 repository, install tiger-vnc and fluxbox:
Them start vncserver, it will ask you to setup password and other options, just follow on screen instructions:
Xvnc will them be running in background. We can now start fluxbox:
This will start fluxbox on the Xvnc server and lock the current terminal. You can also append an "肆物兄" on that command to start it in background.
You can stop fluxbox on the remote desktop.
You can stop vnc:
To access your VNC server, choose your RDP client (like Vinagre on Ubuntu, or VNC Viewer on Android) and connect to your phone IP on port 5901 (for display :1).
To discover your phone IP on the wifi:
Inside Fluxbox you can right-click on the desktop to get a menu and launch stuff like "aterm".
Qemu setup is quite easy, just small gotcha is that I had to use qemu from x11-repo instead of unstable headless, and do not really know why.
Installing Qemu:
That is it.
You will need the Alpine virtual ISO, that you can download from alpine website . Save it as alpine.iso to easy the typing:
Them you will need an image disk for the alpine installation to reside in:
Them you can launch Qemu installation of Alpine. I fyou are on an XVNC session, it will launch a QEMU window.
If you want to keep on the same terminal (not launching a new window) you can append "-nographic" to that last command.
If you are on a QEMU window you can click it to grab focus, and can CTRL+ALT+G to release focus. You can also CTRL+ALT+F to go fullscreen.
On a terminal, you can stop emulation with CTRL+A+X. There are several others Ctrl+A commands.
It will take a while for alpine to boot, but will them present you with a "Login:" terminal, just enter "root" to start.
This is a part that I had trouble, before starting setup inside alpine, you should setup proper network.
First, setup the interfaces, by editing /etc/network/interfaces to have the following content:
Save it, and restart the alpine network:
You should get an IP from the Qemu user network. Please be aware that ping does not work on this setup.
Them, and only them, you also need to add DNS servers, by editing /etc/resolv.conf to the following:
You can test by trying to setup just the repositories:
If this gives you a list of repos to choose from (About 40+), them it worked.
To start installation:
Just follow on screen instructions with attention. Be sure to choose to install on disk "sda" when prompted.
Once the installation is complete, shutdown Alpine by issuing halt"
When it says system halted, exit Qemu (either by CTRL+Alt+g and closing window, or by ctrl+a+x on the terminal).
To start alpine, simply run:
It will be take a while and give you a login prompt for the root user you setup.
The reason I installed it all is to run docker on alpine .
On alpine, edit /etc/pkg/repositories and uncomment comunity repository, them install docker:
Start the service and enable it on boot:
Test it out
On my machine a simple hello world take 1s to echo, while on this setup it takes 25s. Well, at least it works...
Docker Alpine镜像 安装php7
Alpine镜像安装php7后大小只有13M!!非常精简了!果断用上~
运行拉取alpine 镜像
进入容器
安装nginx和php7服务
安装 rc-service
启动nginx
遇到饥裤瞎以下错误问题
/lib/烂空rc/sh/openrc-run.sh: line 273: can't create /sys/fs/cgroup/〜
...
awk: /etc/network/interfaces: No such file or directory
执行以下命令
又遇到问题
WARNING: nginx is already starting
运行
启动php-fpm
加入启动服务
保存镜纯雹像
拉取运行新镜像
完成
alpine docker安装openvpn遇到的问题
Alpine使用的是OpenRCinit系统,而rc-service是openrc的一部分,所以橡蔽安装openrc即可,使洞渗用如下命令安装:
解决:
另一种解决办法:
解决
dockerfile加了一条:VOLUME [ “/梁颤州sys/fs/cgroup” ]
关于dockeralpine和的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。