Skip to content

Commit d0f2dda

Browse files
build in docker (sealerio#1641)
Signed-off-by: david.bao <[email protected]> Signed-off-by: david.bao <[email protected]>
1 parent 8c24705 commit d0f2dda

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

Dockerfile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright © 2022 Alibaba Group Holding Ltd.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
ARG GO_VERSION=1.18.5
16+
17+
ARG BASE_DEBIAN_DISTRO="buster"
18+
ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}"
19+
20+
FROM ${GOLANG_IMAGE} AS base
21+
RUN apt update \
22+
&& apt -y install btrfs-tools libdevmapper-dev libgpgme11-dev
23+

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ linux: clean ## build binaries for linux
2929
@echo "build sealer and seautil bin for linux"
3030
GOOS=linux GOARCH=amd64 hack/build.sh $(GitTag)
3131

32+
# sealer should be compiled in linux platform, otherwise there will be GraphDriver problem.
33+
build-in-docker:
34+
docker run --rm -v ${PWD}:/usr/src/sealer -w /usr/src/sealer registry.cn-qingdao.aliyuncs.com/sealer-io/sealer-build:v1 make linux
35+
3236
test-sealer:
3337
@echo "run e2e test for sealer bin"
3438
hack/test-sealer.sh

0 commit comments

Comments
 (0)