Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Coder
code-server
提交
1ccf69f7
C
code-server
项目概览
镜像
/
Coder
/
code-server
2022-09-21 03:15:05同步失败
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
code-server
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
1ccf69f7
编写于
5月 28, 2021
作者:
A
Akash Satheesan
提交者:
GitHub
5月 28, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: cross-compile docker images with buildx (#3503)
上级
8e92dd62
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
39 addition
and
43 deletion
+39
-43
.github/workflows/ci.yaml
.github/workflows/ci.yaml
+10
-26
CHANGELOG.md
CHANGELOG.md
+1
-1
ci/README.md
ci/README.md
+2
-2
ci/release-image/build.sh
ci/release-image/build.sh
+0
-11
ci/release-image/docker-bake.hcl
ci/release-image/docker-bake.hcl
+25
-0
ci/steps/build-docker-image.sh
ci/steps/build-docker-image.sh
+1
-3
未找到文件。
.github/workflows/ci.yaml
浏览文件 @
1ccf69f7
...
@@ -386,9 +386,10 @@ jobs:
...
@@ -386,9 +386,10 @@ jobs:
-
name
:
Remove release packages and test artifacts
-
name
:
Remove release packages and test artifacts
run
:
rm -rf ./release-packages ./test/test-results
run
:
rm -rf ./release-packages ./test/test-results
docker-amd64
:
# Builds both amd64 and arm64 images
docker-images
:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
needs
:
package-linux-amd64
needs
:
[
package-linux-amd64
,
package-linux-arm64
]
steps
:
steps
:
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v2
...
@@ -398,34 +399,16 @@ jobs:
...
@@ -398,34 +399,16 @@ jobs:
name
:
release-packages
name
:
release-packages
path
:
./release-packages
path
:
./release-packages
-
name
:
Run ./ci/steps/build-docker-image.sh
-
name
:
Set up QEMU
run
:
./ci/steps/build-docker-image.sh
uses
:
docker/setup-qemu-action@v1
-
name
:
Upload release image
-
name
:
Set up Docker Buildx
uses
:
actions/upload-artifact@v2
uses
:
docker/setup-buildx-action@v1
with
:
name
:
release-images
path
:
./release-images
# TODO: this is the last place where we use our self-hosted arm64 runner.
# In the future, consider switching to docker buildx + qemu,
# thus removing the requirement for us to maintain the runner.
docker-arm64
:
runs-on
:
ubuntu-arm64-latest
needs
:
package-linux-arm64
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Download release package
uses
:
actions/download-artifact@v2
with
:
name
:
release-packages
path
:
./release-packages
-
name
:
Run ./ci/steps/build-docker-image.sh
-
name
:
Run ./ci/steps/build-docker-image.sh
run
:
./ci/steps/build-docker-image.sh
run
:
./ci/steps/build-docker-image.sh
-
name
:
Upload release image
-
name
:
Upload release image
s
uses
:
actions/upload-artifact@v2
uses
:
actions/upload-artifact@v2
with
:
with
:
name
:
release-images
name
:
release-images
...
@@ -433,7 +416,7 @@ jobs:
...
@@ -433,7 +416,7 @@ jobs:
trivy-scan-image
:
trivy-scan-image
:
runs-on
:
ubuntu-20.04
runs-on
:
ubuntu-20.04
needs
:
docker-
amd64
needs
:
docker-
images
# NOTE@jsjoeio: disabling due to a memory issue upstream
# NOTE@jsjoeio: disabling due to a memory issue upstream
# See: https://github.com/github/codeql-action/issues/528
# See: https://github.com/github/codeql-action/issues/528
if
:
1 ==
2
if
:
1 ==
2
...
@@ -466,6 +449,7 @@ jobs:
...
@@ -466,6 +449,7 @@ jobs:
uses
:
github/codeql-action/upload-sarif@v1
uses
:
github/codeql-action/upload-sarif@v1
with
:
with
:
sarif_file
:
"
trivy-image-results.sarif"
sarif_file
:
"
trivy-image-results.sarif"
# We have to use two trivy jobs
# We have to use two trivy jobs
# because GitHub only allows
# because GitHub only allows
# codeql/upload-sarif action per job
# codeql/upload-sarif action per job
...
...
CHANGELOG.md
浏览文件 @
1ccf69f7
...
@@ -54,7 +54,7 @@ VS Code v0.00.0
...
@@ -54,7 +54,7 @@ VS Code v0.00.0
### Development
### Development
-
item
-
chore: cross-compile docker images with buildx #3166 @oxy
## 3.10.2
## 3.10.2
...
...
ci/README.md
浏览文件 @
1ccf69f7
...
@@ -100,8 +100,8 @@ You can disable minification by setting `MINIFY=`.
...
@@ -100,8 +100,8 @@ You can disable minification by setting `MINIFY=`.
This directory contains the release docker container image.
This directory contains the release docker container image.
- [./
release-image/build.sh](./release-image/build
.sh)
- [./
ci/steps/build-docker-image.sh](./ci/steps/build-docker-image
.sh)
- Builds the release container
with the tag `
codercom/code-server-$ARCH:$VERSION
`.
- Builds the release container
s with tags `
codercom/code-server-$ARCH:$VERSION
` for amd64 and arm64 with `
docker buildx
`.
- Assumes debian releases are ready in `
./release-packages
`.
- Assumes debian releases are ready in `
./release-packages
`.
## images
## images
...
...
ci/release-image/build.sh
已删除
100755 → 0
浏览文件 @
8e92dd62
#!/usr/bin/env bash
set
-euo
pipefail
main
()
{
cd
"
$(
dirname
"
$0
"
)
/../.."
source
./ci/lib.sh
docker build
-t
"codercom/code-server-
$ARCH
:
$VERSION
"
-f
./ci/release-image/Dockerfile
.
}
main
"
$@
"
ci/release-image/docker-bake.hcl
0 → 100644
浏览文件 @
1ccf69f7
# Use this file from the top of the repo, with `-f ci/release-image/docker-bake.hcl`
# Uses env var VERSION if set;
# normally, this is set by ci/lib.sh
variable "VERSION" {
default = "latest"
}
group "default" {
targets = ["code-server-amd64", "code-server-arm64"]
}
target "code-server-amd64" {
dockerfile = "ci/release-image/Dockerfile"
tags = ["docker.io/codercom/code-server-amd64:${VERSION}"]
platforms = ["linux/amd64"]
output = ["type=tar,dest=./release-images/code-server-amd64-${VERSION}.tar"]
}
target "code-server-arm64" {
dockerfile = "ci/release-image/Dockerfile"
tags = ["docker.io/codercom/code-server-arm64:${VERSION}"]
platforms = ["linux/arm64"]
output = ["type=tar,dest=./release-images/code-server-arm64-${VERSION}.tar"]
}
ci/steps/build-docker-image.sh
浏览文件 @
1ccf69f7
...
@@ -5,10 +5,8 @@ main() {
...
@@ -5,10 +5,8 @@ main() {
cd
"
$(
dirname
"
$0
"
)
/../.."
cd
"
$(
dirname
"
$0
"
)
/../.."
source
./ci/lib.sh
source
./ci/lib.sh
./ci/release-image/build.sh
mkdir
-p
release-images
mkdir
-p
release-images
docker
save
"codercom/code-server-
$ARCH
:
$VERSION
"
>
"release-images/code-server-
$ARCH
-
$VERSION
.tar"
docker
buildx bake
-f
ci/release-image/docker-bake.hcl
}
}
main
"
$@
"
main
"
$@
"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录