diff --git a/scripts/docker-run.sh b/scripts/docker-run.sh index 3e6c5870e4b7..db41fbcc8bfc 100755 --- a/scripts/docker-run.sh +++ b/scripts/docker-run.sh @@ -19,6 +19,8 @@ fi docker run -i -v "$(pwd)":/home/sof/work/sof.git \ --env CMAKE_BUILD_TYPE \ --env PRIVATE_KEY_OPTION \ - --user "$(id -u)" \ + --env http_proxy="$http_proxy" \ + --env https_proxy="$https_proxy" \ + --user "$(id -u)" \ $SOF_DOCKER_RUN \ - sof "$@" + sof "$@" diff --git a/scripts/docker_build/sof_builder/Dockerfile b/scripts/docker_build/sof_builder/Dockerfile index 7b9c43637fa4..a152e096aae5 100644 --- a/scripts/docker_build/sof_builder/Dockerfile +++ b/scripts/docker_build/sof_builder/Dockerfile @@ -14,19 +14,24 @@ # docker run -it -v :/home/sof/work/sof.git --user `id -u` sof ./incremental.sh # -FROM ubuntu:18.04 +FROM ubuntu:20.04 ARG UID=1000 -# Set up proxy from host -COPY apt.conf /etc/apt/ ARG host_http_proxy ARG host_https_proxy ENV http_proxy $host_http_proxy ENV https_proxy $host_https_proxy +# for non-interactive package install +ARG DEBIAN_FRONTEND=noninteractive + RUN apt-get -y update && \ apt-get install -y \ - autoconf \ + dialog \ + apt-utils \ + vim \ + jed \ + autoconf \ bison \ build-essential \ python3-pyelftools \ @@ -60,10 +65,14 @@ echo "sof:test0000" | chpasswd && adduser sof sudo ENV HOME /home/sof # Use ToT alsa utils for the latest topology patches. +# Note: For alsa-lib, set default library directory to /usr/lib/x86_64-linux-gnu. +# By default it goes to /usr/lib64, but Ubuntu 20.04's default shared library +# path does not have this. Typical build error is like, +# alsatplg: error while loading shared libraries: libatopology.so.2: cannot open shared object file: No such file or directory RUN mkdir -p /home/sof/work/alsa && cd /home/sof/work/alsa && \ git clone $CLONE_DEFAULTS https://github.com/thesofproject/alsa-lib.git && \ git clone $CLONE_DEFAULTS https://github.com/thesofproject/alsa-utils.git && \ -cd /home/sof/work/alsa/alsa-lib && ./gitcompile && make install && \ +cd /home/sof/work/alsa/alsa-lib && ./gitcompile --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu/ && make install && \ cd /home/sof/work/alsa/alsa-utils && ./gitcompile && make install &&\ chown -R sof:sof /home/sof diff --git a/scripts/docker_build/sof_builder/docker-build.sh b/scripts/docker_build/sof_builder/docker-build.sh index b676f0c13643..f3eb15388d2c 100755 --- a/scripts/docker_build/sof_builder/docker-build.sh +++ b/scripts/docker_build/sof_builder/docker-build.sh @@ -2,9 +2,5 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation. All rights reserved. -if [ -f "/etc/apt/apt.conf" ]; then - cp /etc/apt/apt.conf ./ -else - touch apt.conf -fi -docker build --build-arg UID=$(id -u) --build-arg host_http_proxy=$http_proxy --build-arg host_https_proxy=$https_proxy -t sof . +docker build --build-arg UID=$(id -u) --build-arg host_http_proxy="$http_proxy" \ + --build-arg host_https_proxy="$https_proxy" -t sof . diff --git a/scripts/docker_build/sof_qemu/Dockerfile b/scripts/docker_build/sof_qemu/Dockerfile index 112597feb358..6864cbd4a76e 100644 --- a/scripts/docker_build/sof_qemu/Dockerfile +++ b/scripts/docker_build/sof_qemu/Dockerfile @@ -12,18 +12,23 @@ # ./scripts/docker-qemu.sh scrpits-or-command-you-want-run # -FROM ubuntu:18.04 +FROM ubuntu:20.04 ARG UID=1000 -# Set up proxy from host -COPY apt.conf /etc/apt/ ARG host_http_proxy ARG host_https_proxy ENV http_proxy $host_http_proxy ENV https_proxy $host_https_proxy +# for non-interactive package install +ARG DEBIAN_FRONTEND=noninteractive + RUN apt-get -y update && \ apt-get install -y \ + vim \ + jed \ + dialog \ + apt-utils \ autoconf \ build-essential \ git \ diff --git a/scripts/docker_build/sof_qemu/docker-build.sh b/scripts/docker_build/sof_qemu/docker-build.sh index 5beba7985625..66a520e06a65 100755 --- a/scripts/docker_build/sof_qemu/docker-build.sh +++ b/scripts/docker_build/sof_qemu/docker-build.sh @@ -2,9 +2,5 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation. All rights reserved. -if [ -f "/etc/apt/apt.conf" ]; then - cp /etc/apt/apt.conf ./ -else - touch apt.conf -fi -docker build --build-arg UID=$(id -u) --build-arg host_http_proxy=$http_proxy --build-arg host_https_proxy=$https_proxy -t sofqemu . +docker build --build-arg UID=$(id -u) --build-arg host_http_proxy="$http_proxy" \ + --build-arg host_https_proxy="$https_proxy" -t sofqemu .