From 2234b1bc1a0519495a485930d5e32bb898e3bda4 Mon Sep 17 00:00:00 2001 From: Fred Oh Date: Tue, 11 May 2021 10:55:44 -0700 Subject: [PATCH 1/5] docker-run.sh: set http/https proxy when docker run Use http/https proxys setting from the host. Signed-off-by: Fred Oh --- scripts/docker-run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/docker-run.sh b/scripts/docker-run.sh index 3e6c5870e4b7..c802c7cfd0ce 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 \ + --env http_proxy=${http_proxy} \ + --env https_proxy=${https_proxy} \ --user "$(id -u)" \ $SOF_DOCKER_RUN \ sof "$@" From bd1033cce32efa2584d7e174e3251d1187be8e95 Mon Sep 17 00:00:00 2001 From: Fred Oh Date: Tue, 11 May 2021 11:11:14 -0700 Subject: [PATCH 2/5] docker-run.sh: minor alignment fix Removed extra spaces. Signed-off-by: Fred Oh --- scripts/docker-run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/docker-run.sh b/scripts/docker-run.sh index c802c7cfd0ce..b74c656d0709 100755 --- a/scripts/docker-run.sh +++ b/scripts/docker-run.sh @@ -21,6 +21,6 @@ docker run -i -v "$(pwd)":/home/sof/work/sof.git \ --env PRIVATE_KEY_OPTION \ --env http_proxy=${http_proxy} \ --env https_proxy=${https_proxy} \ - --user "$(id -u)" \ + --user "$(id -u)" \ $SOF_DOCKER_RUN \ - sof "$@" + sof "$@" From d225033c7127c84e70e3f94c4ff79b46cc5cc458 Mon Sep 17 00:00:00 2001 From: Fred Oh Date: Tue, 11 May 2021 11:14:31 -0700 Subject: [PATCH 3/5] Dockerfile: remove apt.conf at the end apt.conf has proxy settings to build new image. For convenience, it is copied from the host, But apt.conf should be removed from the image, which will be proxy-free. Signed-off-by: Fred Oh --- scripts/docker_build/sof_builder/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/docker_build/sof_builder/Dockerfile b/scripts/docker_build/sof_builder/Dockerfile index 7b9c43637fa4..d1800d36f71d 100644 --- a/scripts/docker_build/sof_builder/Dockerfile +++ b/scripts/docker_build/sof_builder/Dockerfile @@ -17,7 +17,7 @@ FROM ubuntu:18.04 ARG UID=1000 -# Set up proxy from host +# Set up proxy from host, this will be deleted at the end COPY apt.conf /etc/apt/ ARG host_http_proxy ARG host_https_proxy @@ -115,3 +115,6 @@ RUN mkdir -p /home/sof/work/sof.git USER sof WORKDIR /home/sof/work/sof.git/ + +# delete apt proxy setting +RUN rm /etc/apt/apt.conf From abeccec984949f1ad98f6c73425bc87b9151980d Mon Sep 17 00:00:00 2001 From: Fred Oh Date: Tue, 11 May 2021 11:23:25 -0700 Subject: [PATCH 4/5] Dockerfile: add vim to apt install list Can't imagine without vim. Signed-off-by: Fred Oh --- scripts/docker_build/sof_builder/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/docker_build/sof_builder/Dockerfile b/scripts/docker_build/sof_builder/Dockerfile index d1800d36f71d..0809761e8054 100644 --- a/scripts/docker_build/sof_builder/Dockerfile +++ b/scripts/docker_build/sof_builder/Dockerfile @@ -26,6 +26,7 @@ ENV https_proxy $host_https_proxy RUN apt-get -y update && \ apt-get install -y \ + vim \ autoconf \ bison \ build-essential \ From bd8c7ec09483ff32d4e4d0bd5092e3da5d929849 Mon Sep 17 00:00:00 2001 From: Fred Oh Date: Tue, 11 May 2021 13:01:42 -0700 Subject: [PATCH 5/5] docker: upgrade base ubuntu image to 20.04 Catching up latest LTS Ubuntu image, 20.04. Signed-off-by: Fred Oh --- scripts/docker_build/sof_builder/Dockerfile | 7 ++++++- scripts/docker_build/sof_qemu/Dockerfile | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/docker_build/sof_builder/Dockerfile b/scripts/docker_build/sof_builder/Dockerfile index 0809761e8054..fbf283c83c2e 100644 --- a/scripts/docker_build/sof_builder/Dockerfile +++ b/scripts/docker_build/sof_builder/Dockerfile @@ -14,7 +14,7 @@ # 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, this will be deleted at the end @@ -24,8 +24,13 @@ 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 \ + dialog \ + apt-utils \ vim \ autoconf \ bison \ diff --git a/scripts/docker_build/sof_qemu/Dockerfile b/scripts/docker_build/sof_qemu/Dockerfile index 112597feb358..c60b96cb2593 100644 --- a/scripts/docker_build/sof_qemu/Dockerfile +++ b/scripts/docker_build/sof_qemu/Dockerfile @@ -12,7 +12,7 @@ # ./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 @@ -22,8 +22,13 @@ 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 \ + dialog \ + apt-utils \ autoconf \ build-essential \ git \