当前位置:网站首页>Earthly container image construction tool -- the road to dream
Earthly container image construction tool -- the road to dream
2022-06-24 08:44:00 【The road to dream】

Makefile + Dockerfile = Earthfile
In the use of Earthly Currently, when building images, it is strongly dependent on buildkit,Earthly adopt buildkit Supported some Dockerfile Extended syntax for , At the same time Dockerfile And Makefile Integrate , Make multi platform construction and coding Dockerfile Make it easier ; Use Earthly It can be completed more conveniently Dockerfile Code reuse and more friendly CI Automatic integration .
# install
sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete'
After installation Earthly Will start a buildkitd Containers : earthly-buildkitd
# Example
cat main.go
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
cat Earthlyfile
FROM golang:1.17-alpine
WORKDIR /go-example
build:
COPY main.go .
RUN go build -o build/go-example main.go
SAVE ARTIFACT build/go-example /go-example AS LOCAL build/go-example
docker:
COPY +build/go-example .
ENTRYPOINT ["/go-example/go-example"]
SAVE IMAGE go-example:latest
# Directory structure
~/t/earthlytest *** tree
.
├── Earthfile
└── main.go
0 directories, 2 files
# adopt earthly Build
~/t/earthlytest *** earthly +docker
I'll summarize later
More powerful container image building tools Earthly
GitHub - earthly/earthly: The effortless CI/CD framework that runs anywhere
边栏推荐
- 小黑ai4code代码baseline啃食1
- Take my brother to do the project. It's cold
- Opencv get (propid) common values
- ZUCC_ Principles of compiling language and compilation_ Experiment 05 regular expression, finite automata, lexical analysis
- RuntimeError: Missing dependencies:XXX
- uniapp 热更新后台管理
- Xiaohei ai4code code baseline nibble 1
- Base64编码详解及其变种(解决加号在URL变空格问题)
- 解析互联网广告术语 CPM、CPC、CPA、CPS、CPL、CPR 是什么意思
- 關於ETL看這篇文章就够了,三分鐘讓你明白什麼是ETL
猜你喜欢

ZUCC_ Principles of compiling language and compilation_ Experiment 02 fsharp Ocaml language

教程篇(5.0) 08. Fortinet安全架构集成与FortiXDR * FortiEDR * Fortinet 网络安全专家 NSE 5

uniapp 热更新后台管理
![Fundamentals of 3D mathematics [17] inverse square theorem](/img/59/bef931d96883288766fc94e38e0ace.png)
Fundamentals of 3D mathematics [17] inverse square theorem

数据库迁移从PostgreSQL迁移到 MYSQL

OpenCV to realize the basic transformation of image

ZUCC_ Principles of compiling language and compilation_ Experiment 04 language and grammar

表单图片上传在Chorme中无法查看请求体的二进制图片信息

Xiaohei ai4code code baseline nibble 1

pymysql 向MySQL 插入数据无故报错
随机推荐
Video Fusion communication has become an inevitable trend of emergency command communication. How to realize it based on easyrtc?
利用ngrok做内网穿透
QT writing security video monitoring system 36 onvif continuous movement
深度学习与神经网络:最值得关注的6大趋势
pymysql 向MySQL 插入数据无故报错
Scheduled database backup script
MATLAB Camera Calibrator相机标定
Shell basic operator -- arithmetic operator
關於ETL看這篇文章就够了,三分鐘讓你明白什麼是ETL
Shell pass parameters
PHP code encryption + extended decryption practice
Blue screen error UNMOUNTABLE boot volume of the solution
Introduction to data platform
lombok 使用
Micro build low code online "quick registration applet" capability
"Adobe international certification" Photoshop software, about drawing tutorial?
利用sonar做代码检查
uniapp 热更新后台管理
Centos7 installation of jdk8, mysql5.7 and Navicat connection to virtual machine MySQL and solutions (solutions to MySQL download errors are attached)
Numpy 中的方法汇总