-
Couldn't load subscription status.
- Fork 26
docker
-
只在客户端进行的
`Dockerfile`语法检查器。
可以通过 https://microbadger.com 展示层数、大小等信息。
-
在Dockerfile中加入:
ARG BUILD_DATE ARG VCS_REF LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.vcs-url="https://github.com/rossf7/label-schema-automated-build.git" \ org.label-schema.vcs-ref=$VCS_REF \ org.label-schema.schema-version="1.0.0-rc1" -
hooks/build
#!/bin/bash # $IMAGE_NAME var is injected into the build so the tag is correct. echo "Build hook running" docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg VCS_REF=`git rev-parse --short HEAD` \ -t $IMAGE_NAME .
alias git="docker run -ti --rm -v \$(pwd):/git bwits/docker-git-alpine"docker run -it -v <your directory>:/documents/ asciidoctor/docker-asciidoctor-
基本用法
-
asciidoctor sample.adoc -
asciidoctor-pdf sample.adoc -
asciidoctor-epub3 sample.adoc
-
-
支持diagrams
-
asciidoctor -r asciidoctor-diagram sample-with-diagram.adoc -
asciidoctor-pdf -r asciidoctor-diagram sample-with-diagram.adoc -
asciidoctor-epub3 -r asciidoctor-diagram sample-with-diagram.adoc
-
-
使用backends。backends
-T /asciidoctor-backends/<引擎>或-T $BACKENDS/<引擎>asciidoctor -T /asciidoctor-backends/slim/dzslides myFile.adoc #or asciidoctor -T $BACKENDS/slim/dzslides myFile.adoc
-
fopub
先生成docbook,再调用fopub
asciidoctor -b docbook sample.adoc fopub sample.xml
-
asciidoctor-confluence
asciidoctor-confluence --host HOSTNAME --spaceKey SPACEKEY --title TITLE --username USER --password PASSWORD sample.adoc
-
批处理
docker run --rm -v $(pwd):/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf index.adoc
需要先
-
Install the latest XQuartz X11 server and run it
-
Activate the option ‘Allow connections from network clients’ in XQuartz settings
-
Quit & restart XQuartz (to activate the setting)
-
xhost + 127.0.0.1
docker run -e DISPLAY=host.docker.internal:0 -v $HOME:/home/user --name vscode jessfraz/vscodedocker run -e DISPLAY=host.docker.internal:0 -v $HOME/Pictures:/root/Picture --name gimp jessfraz/gimp由于FreeNAS 11的GUI创建的虚拟机只支持UEFI启动,而RancherOS的ISO不支持UEFI启动,因此只能在命令行下通过iohyve安装。
# rancheros的下载地址: https://releases.rancher.com/os/latest/rancheros.iso
# 在指定pool下创建iohyve pool并建立相应的mount
sudo iohyve setup pool=main kmod=1 net=bge0
# 把iso拷贝到iohyve内部存储上
sudo iohyve cpiso /mnt/main/media/softwares/linux_iso/rancheros.iso
# 或者直接下载
#sudo iohyve fetch https://releases.rancher.com/os/latest/rancheros.iso
# 创建虚拟机,2G硬盘
sudo iohyve create RancherOS 2G
sudo iohyve set RancherOS loader=grub-bhyve ram=2G cpu=1 os=debian boot=1# 安装操作系统
sudo iohyve install RancherOS rancheros.iso在另一个窗口运行命令,打开虚拟机的控制台,配置GRUB
sudo iohyve console RancherOS在控制台上按回车,在GRUB提示符下输入:
grub> set root=(cd0,msdos1)
grub> linux /boot/vm<TAB> ro rancher.password=rancher
grub> initrd /boot/initrd<TAB>
grub> boot目前版本用的是:
-
/boot/vmlinuz-4.9.80-rancher
-
initrd /boot/initrd-v1.3.0
vi cloud-config.yml# cloud-config
ssh_authorized_keys:
- ssh-rsa <your pubkey here>sudo ros install -c cloud-config.yml -d /dev/sda重启会失败,这是正常的。
# 确认虚拟机已经停止
sudo iohyve list设置启动方式:
sudo iohyve set RancherOS os=custom
sudo iohyve set RancherOS boot=1删除 /mnt/iohyve/RancherOS/device.map 中,除了 hd0 以外的行。
创建 grub.cfg
set root=(hd0,1) linux /boot/vmlinuz-4.9.80-rancher printk.devkmsg=on rancher.state.dev=LABEL=RANCHER_STATE rancher.state.wait console=tty0 initrd /boot/initrd-v1.3.0 boot
此时,虚拟机应该可以成功启动。
-
设置虚拟机的地址
sudo ros config set rancher.network.interfaces.eth0.address 172.31.0.70/24 sudo ros config set rancher.network.interfaces.eth0.gateway 172.31.0.253 sudo ros config set rancher.network.interfaces.eth0.mtu 1500 sudo ros config set rancher.network.interfaces.eth0.dhcp false # 重启生效 sudo reboot
-
在虚拟机中安装
rancher服务sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher
-
配置
Rancher-
打开管理页面,地址为上面查到的虚拟机地址,端口为8080
-
增加要管理的主机
点击
Add a host,填写与上面相同的IP和端口
-
不需要daemon,代替docker运行容器的工具,是libpod的一部分。
$ docker login registry.redhat.io
Username: ${REGISTRY-SERVICE-ACCOUNT-USERNAME}
Password: ${REGISTRY-SERVICE-ACCOUNT-PASSWORD}
Login Succeeded!
$ docker pull registry.redhat.io/rhel7