当前位置:网站首页>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
边栏推荐
- Building a static website with eleventy
- orb slam build bug: undefined reference to symbol ‘_ ZN5boost6system15system_ categoryEv‘
- 關於ETL看這篇文章就够了,三分鐘讓你明白什麼是ETL
- js中通过key查找和更新对象中指定值的方法
- String转Base64
- OpenCV to realize the basic transformation of image
- [xinliu-s6 new model +sa 3-star Xinghai] the new two-way server of the third generation chip was launched and the product was updated~
- (pkcs1) RSA public private key PEM file parsing
- leetcode 1642. Furthest building you can reach
- Shell basic operator -- arithmetic operator
猜你喜欢

It is enough to read this article about ETL. Three minutes will let you understand what ETL is

数据库迁移从PostgreSQL迁移到 MYSQL

ZUCC_ Principles of compiling language and compilation_ Experiment 0607 grammar analysis ll analysis

Markdown to realize text link jump

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

中国芯片独角兽公司

Qt 中发送自定义事件

Redis cluster data skew

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

ZUCC_ Principles of compiling language and compilation_ Experiment 05 regular expression, finite automata, lexical analysis
随机推荐
Qmenu response in pyqt
Rescue system -- the application of read-write separation
uniapp 热更新后台管理
[10 day SQL introduction] Day2
Jenkins自动化部署,连接不到所依赖的服务【已解决】
Xtrabackup for data backup
单目双视三维坐标确定
Video Fusion communication has become an inevitable trend of emergency command communication. How to realize it based on easyrtc?
PHP code encryption + extended decryption practice
lombok 使用
How to replace the web player easyplayerproactivex Key in OCX?
成为IEEE学生会员
Using ngrok for intranet penetration
[xinliu-s6 new model +sa 3-star Xinghai] the new two-way server of the third generation chip was launched and the product was updated~
Rsync for file backup
"Adobe international certification" Photoshop software, about drawing tutorial?
Qt 中发送自定义事件
Lombok use
ZUCC_ Principles of compiling language and compilation_ Experiment 04 language and grammar
Increase insert speed