Skip to content

Commit

Permalink
Merge #415
Browse files Browse the repository at this point in the history
415: README: use `apt-get --assume-yes` in Dockerfile r=reitermarkus a=Minoru

This little change makes it even easier for someone to create their own Dockerfile: they simply copy an example and start listing the packages they need. Without `--assume-yes`, `apt-get install` will try to interactively ask for confirmation, and fail since `docker build` runs it in a non-interactive environment.

Co-authored-by: Alexander Batischev <[email protected]>
  • Loading branch information
bors[bot] and Minoru committed May 2, 2020
2 parents 29350e5 + c66a5c6 commit de91808
Show file tree
Hide file tree
Showing 41 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ FROM rustembedded/cross:aarch64-unknown-linux-gnu-0.1.16

RUN dpkg --add-architecture arm64 && \
apt-get update && \
apt-get install libfoo:arm64
apt-get install --assume-yes libfoo:arm64
```

```
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.aarch64-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh

RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-aarch64-linux-gnu \
libc6-dev-arm64-cross

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.arm-unknown-linux-gnueabi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY xargo.sh /
RUN /xargo.sh

COPY qemu.sh /
RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-arm-linux-gnueabi \
libc6-dev-armel-cross && \
/qemu.sh arm
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.arm-unknown-linux-gnueabihf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY xargo.sh /
RUN /xargo.sh

RUN mkdir /usr/arm-linux-gnueabihf && \
apt-get install -y --no-install-recommends curl xz-utils && \
apt-get install --assume-yes --no-install-recommends curl xz-utils && \
cd /usr/arm-linux-gnueabihf && \
curl -L https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz | \
tar --strip-components 1 -xJ && \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.armv5te-unknown-linux-gnueabi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY xargo.sh /
RUN /xargo.sh

COPY qemu.sh /
RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-arm-linux-gnueabi \
crossbuild-essential-armel \
libc6-dev-armel-cross && \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.armv7-unknown-linux-gnueabihf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh

RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-arm-linux-gnueabihf \
libc6-dev-armhf-cross

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.asmjs-unknown-emscripten
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ENV PATH="${EMSDK}:${EMSDK}/emscripten/sdk:${EMSDK}/llvm/clang/bin:${EMSDK}/node

ENTRYPOINT ["/emsdk_portable/entrypoint"]

RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
libxml2 \
python

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.i586-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh

RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-multilib
2 changes: 1 addition & 1 deletion docker/Dockerfile.i686-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh

RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-multilib

COPY qemu.sh /
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.mips-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh

RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-mips-linux-gnu \
libc6-dev-mips-cross

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.mips64-unknown-linux-gnuabi64
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY xargo.sh /
RUN /xargo.sh

COPY qemu.sh /
RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-mips64-linux-gnuabi64 \
libc6-dev-mips64-cross && \
/qemu.sh mips64
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.mips64el-unknown-linux-gnuabi64
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh

RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-mips64el-linux-gnuabi64 \
libc6-dev-mips64el-cross

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.mipsel-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh

RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-mipsel-linux-gnu \
libc6-dev-mipsel-cross

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.powerpc-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh

RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-powerpc-linux-gnu \
libc6-dev-powerpc-cross

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.powerpc64-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh

RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-powerpc64-linux-gnu \
libc6-dev-ppc64-cross

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.powerpc64le-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh

RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-powerpc64le-linux-gnu \
libc6-dev-ppc64el-cross

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.s390x-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh

RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-s390x-linux-gnu \
libc6-dev-s390x-cross

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.sparc64-unknown-linux-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh

RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
g++-sparc64-linux-gnu \
libc6-dev-sparc64-cross

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.thumbv6m-none-eabi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY xargo.sh /
RUN /xargo.sh

COPY qemu.sh /
RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi && \
/qemu.sh arm
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.thumbv7em-none-eabi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY xargo.sh /
RUN /xargo.sh

COPY qemu.sh /
RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi && \
/qemu.sh arm
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.thumbv7em-none-eabihf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY xargo.sh /
RUN /xargo.sh

COPY qemu.sh /
RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi && \
/qemu.sh arm
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.thumbv7m-none-eabi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY xargo.sh /
RUN /xargo.sh

COPY qemu.sh /
RUN apt-get install -y --no-install-recommends \
RUN apt-get install --assume-yes --no-install-recommends \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi && \
/qemu.sh arm
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.wasm32-unknown-emscripten
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ENV PATH="${EMSDK}:${EMSDK}/emscripten/sdk:${EMSDK}/llvm/clang/bin:${EMSDK}/node

ENTRYPOINT ["/emsdk_portable/entrypoint"]

RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
libxml2 \
python

Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.x86_64-pc-windows-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ COPY xargo.sh /
RUN /xargo.sh

RUN dpkg --add-architecture i386 && apt-get update && \
apt-get install -y --no-install-recommends \
apt-get install --assume-yes --no-install-recommends \
wine-stable \
wine64 \
wine32 \
libz-mingw-w64-dev

RUN apt-get install -y --no-install-recommends g++-mingw-w64-x86-64
RUN apt-get install --assume-yes --no-install-recommends g++-mingw-w64-x86-64

# run-detectors are responsible for calling the correct interpreter for exe
# files. For some reason it does not work inside a docker container (it works
Expand Down
2 changes: 1 addition & 1 deletion docker/android-ndk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ main() {
local purge_list=()
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep; then
apt-get install --no-install-recommends -y $dep
apt-get install --no-install-recommends --assume-yes $dep
purge_list+=( $dep )
fi
done
Expand Down
2 changes: 1 addition & 1 deletion docker/android-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ EOF
local purge_list=(default-jre)
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep; then
apt-get install --no-install-recommends -y $dep
apt-get install --no-install-recommends --assume-yes $dep
purge_list+=( $dep )
fi
done
Expand Down
2 changes: 1 addition & 1 deletion docker/cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ main() {
local purge_list=()
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep; then
apt-get install --no-install-recommends -y $dep
apt-get install --no-install-recommends --assume-yes $dep
purge_list+=( $dep )
fi
done
Expand Down
2 changes: 1 addition & 1 deletion docker/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sed -i 's/http:\/\/\(.*\).ubuntu.com\/ubuntu\//[arch=amd64,i386] http:\/\/\1.arc

apt-get update

apt-get install -y --no-install-recommends \
apt-get install --assume-yes --no-install-recommends \
autoconf \
automake \
binutils \
Expand Down
2 changes: 1 addition & 1 deletion docker/disabled/Dockerfile.i686-pc-windows-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COPY xargo.sh /
RUN /xargo.sh

RUN dpkg --add-architecture i386 && apt-get update && \
apt-get install -y --no-install-recommends \
apt-get install --assume-yes --no-install-recommends \
wine-stable \
wine64 \
wine32 \
Expand Down
2 changes: 1 addition & 1 deletion docker/disabled/dragonfly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ main() {
local purge_list=()
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep; then
apt-get install --no-install-recommends -y $dep
apt-get install --no-install-recommends --assume-yes $dep
purge_list+=( $dep )
fi
done
Expand Down
2 changes: 1 addition & 1 deletion docker/dropbear.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ main() {
local purge_list=()
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep; then
apt-get install --no-install-recommends -y $dep
apt-get install --no-install-recommends --assume-yes $dep
purge_list+=( $dep )
fi
done
Expand Down
2 changes: 1 addition & 1 deletion docker/emscripten.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ main() {
local purge_list=()
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep; then
apt-get install --no-install-recommends -y $dep
apt-get install --no-install-recommends --assume-yes $dep
purge_list+=( $dep )
fi
done
Expand Down
2 changes: 1 addition & 1 deletion docker/freebsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ main() {
local purge_list=()
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep; then
apt-get install --no-install-recommends -y $dep
apt-get install --no-install-recommends --assume-yes $dep
purge_list+=( $dep )
fi
done
Expand Down
2 changes: 1 addition & 1 deletion docker/linux-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ main() {
apt-get update
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep; then
apt-get install --no-install-recommends -y $dep
apt-get install --no-install-recommends --assume-yes $dep
purge_list+=( $dep )
fi
done
Expand Down
4 changes: 2 additions & 2 deletions docker/mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ main() {

# Install mingw (with sjlj exceptions) to get the dependencies right
# Later we replace these packages with the new ones
apt-get install -y --no-install-recommends g++-mingw-w64-i686
apt-get install --assume-yes --no-install-recommends g++-mingw-w64-i686

local td=$(mktemp -d)

Expand All @@ -22,7 +22,7 @@ main() {
local purge_list=()
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep > /dev/null; then
apt-get install -y --no-install-recommends $dep
apt-get install --assume-yes --no-install-recommends $dep
purge_list+=( $dep )
fi
done
Expand Down
2 changes: 1 addition & 1 deletion docker/musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ main() {
local purge_list=()
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep; then
apt-get install --no-install-recommends -y $dep
apt-get install --no-install-recommends --assume-yes $dep
purge_list+=( $dep )
fi
done
Expand Down
2 changes: 1 addition & 1 deletion docker/netbsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ main() {
local purge_list=()
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep; then
apt-get install --no-install-recommends -y $dep
apt-get install --no-install-recommends --assume-yes $dep
purge_list+=( $dep )
fi
done
Expand Down
2 changes: 1 addition & 1 deletion docker/qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ main() {
local purge_list=()
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep; then
apt-get install --no-install-recommends -y $dep
apt-get install --no-install-recommends --assume-yes $dep
purge_list+=( $dep )
fi
done
Expand Down
2 changes: 1 addition & 1 deletion docker/solaris.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ main() {
local purge_list=()
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep; then
apt-get install --no-install-recommends -y $dep
apt-get install --no-install-recommends --assume-yes $dep
purge_list+=( $dep )
fi
done
Expand Down
2 changes: 1 addition & 1 deletion docker/xargo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ main() {
local purge_list=()
for dep in ${dependencies[@]}; do
if ! dpkg -L $dep; then
apt-get install --no-install-recommends -y $dep
apt-get install --no-install-recommends --assume-yes $dep
purge_list+=( $dep )
fi
done
Expand Down
2 changes: 1 addition & 1 deletion src/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn register(target: &Target, verbose: bool) -> Result<()> {
"mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc && \
echo ':wine:M::MZ::/usr/bin/run-detectors:' > /proc/sys/fs/binfmt_misc/register"
} else {
"apt-get update && apt-get install --no-install-recommends -y \
"apt-get update && apt-get install --no-install-recommends --assume-yes \
binfmt-support qemu-user-static"
};

Expand Down

0 comments on commit de91808

Please sign in to comment.