mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-11 12:52:23 +00:00
ubuntu/debian: create aarch64-specific Dockerfile.in
The musl package in ubuntu/debian could not provide everything we need on aarch64. e.g. we need `aarch64-linux-musl-gcc` as linker, and it's not provided in package. Fixes: #411 Signed-off-by: Penny Zheng <penny.zheng@arm.com>
This commit is contained in:
parent
9cba8c4c27
commit
41aaa36e6f
35
rootfs-builder/debian/Dockerfile-aarch64.in
Normal file
35
rootfs-builder/debian/Dockerfile-aarch64.in
Normal file
@ -0,0 +1,35 @@
|
||||
#
|
||||
# Copyright (c) 2020 ARM Limited
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# NOTE: OS_VERSION is set according to config.sh
|
||||
from docker.io/debian:@OS_VERSION@
|
||||
|
||||
# RUN commands
|
||||
RUN apt-get update && apt-get install -y \
|
||||
autoconf \
|
||||
automake \
|
||||
binutils \
|
||||
build-essential \
|
||||
chrony \
|
||||
cmake \
|
||||
coreutils \
|
||||
curl \
|
||||
debianutils \
|
||||
debootstrap \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
libc-dev \
|
||||
libstdc++-6-dev \
|
||||
m4 \
|
||||
make \
|
||||
sed \
|
||||
systemd \
|
||||
tar \
|
||||
vim
|
||||
# This will install the proper golang to build Kata components
|
||||
@INSTALL_GO@
|
||||
@INSTALL_MUSL@
|
||||
@INSTALL_RUST@
|
39
rootfs-builder/ubuntu/Dockerfile-aarch64.in
Normal file
39
rootfs-builder/ubuntu/Dockerfile-aarch64.in
Normal file
@ -0,0 +1,39 @@
|
||||
#
|
||||
# Copyright (c) 2020 ARM Limited
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#ubuntu: docker image to be used to create a rootfs
|
||||
#@OS_VERSION@: Docker image version to build this dockerfile
|
||||
from docker.io/ubuntu:@OS_VERSION@
|
||||
|
||||
# This dockerfile needs to provide all the componets need to build a rootfs
|
||||
# Install any package need to create a rootfs (package manager, extra tools)
|
||||
|
||||
# RUN commands
|
||||
RUN apt-get update && apt-get install -y \
|
||||
autoconf \
|
||||
automake \
|
||||
binutils \
|
||||
build-essential \
|
||||
chrony \
|
||||
cmake \
|
||||
coreutils \
|
||||
curl \
|
||||
debianutils \
|
||||
debootstrap \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
libc6-dev \
|
||||
libstdc++-8-dev \
|
||||
m4 \
|
||||
make \
|
||||
sed \
|
||||
systemd \
|
||||
tar \
|
||||
vim
|
||||
# This will install the proper golang to build Kata components
|
||||
@INSTALL_GO@
|
||||
@INSTALL_MUSL@
|
||||
@INSTALL_RUST@
|
@ -274,7 +274,6 @@ generate_dockerfile()
|
||||
curlOptions=("-OL")
|
||||
[ -n "${http_proxy:-}" ] && curlOptions+=("-x ${http_proxy:-}")
|
||||
|
||||
readonly dockerfile_template="Dockerfile.in"
|
||||
readonly install_go="
|
||||
RUN cd /tmp ; curl ${curlOptions[@]} https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${goarch}.tar.gz
|
||||
RUN tar -C /usr/ -xzf /tmp/go${GO_VERSION}.linux-${goarch}.tar.gz
|
||||
@ -344,7 +343,15 @@ RUN ln -sf /usr/bin/g++ /bin/musl-g++
|
||||
# rust agent still need go to build
|
||||
# because grpc-sys need go to build
|
||||
pushd ${dir}
|
||||
dockerfile_template="Dockerfile.in"
|
||||
dockerfile_arch_template="Dockerfile-${architecture}.in"
|
||||
# if arch-specific docker file exists, swap the univesal one with it.
|
||||
if [ -f "${dockerfile_arch_template}" ]; then
|
||||
dockerfile_template="${dockerfile_arch_template}"
|
||||
else
|
||||
[ -f "${dockerfile_template}" ] || die "${dockerfile_template}: file not found"
|
||||
fi
|
||||
|
||||
# powerpc have no musl target, don't setup rust enviroment
|
||||
# since we cannot static link agent. Besides, there is
|
||||
# also long double representation problem when building musl-libc
|
||||
|
Loading…
Reference in New Issue
Block a user