Dockerfile: move sudo to standard Dockerfile
To expand the usability of the standard Docker image, move sudo enablement from Docker.isar. Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
6e82e0d12d
commit
eb63b1873b
@ -18,7 +18,7 @@ RUN apt-get install --no-install-recommends -y \
|
|||||||
python3-setuptools python3-wheel python3-yaml python3-distro python3-jsonschema \
|
python3-setuptools python3-wheel python3-yaml python3-distro python3-jsonschema \
|
||||||
gosu lsb-release file vim less procps tree tar bzip2 zstd bc tmux libncurses-dev \
|
gosu lsb-release file vim less procps tree tar bzip2 zstd bc tmux libncurses-dev \
|
||||||
dosfstools mtools parted \
|
dosfstools mtools parted \
|
||||||
git-lfs mercurial iproute2 ssh-client curl rsync gnupg awscli && \
|
git-lfs mercurial iproute2 ssh-client curl rsync gnupg awscli sudo && \
|
||||||
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
apt-get install --no-install-recommends -y gcc-multilib syslinux; \
|
apt-get install --no-install-recommends -y gcc-multilib syslinux; \
|
||||||
fi && \
|
fi && \
|
||||||
@ -33,4 +33,10 @@ ENV GIT_PROXY_COMMAND="oe-git-proxy" \
|
|||||||
COPY . /kas
|
COPY . /kas
|
||||||
RUN pip3 --proxy=$https_proxy install --no-deps /kas && kas --help
|
RUN pip3 --proxy=$https_proxy install --no-deps /kas && kas --help
|
||||||
|
|
||||||
|
RUN echo "builder ALL=NOPASSWD: ALL" > /etc/sudoers.d/builder-nopasswd && \
|
||||||
|
chmod 660 /etc/sudoers.d/builder-nopasswd
|
||||||
|
|
||||||
|
RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy\"" \
|
||||||
|
> /etc/sudoers.d/env_keep && chmod 660 /etc/sudoers.d/env_keep
|
||||||
|
|
||||||
ENTRYPOINT ["/kas/container-entrypoint"]
|
ENTRYPOINT ["/kas/container-entrypoint"]
|
||||||
|
@ -14,16 +14,10 @@ RUN echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sou
|
|||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y -f --no-install-recommends \
|
apt-get install -y -f --no-install-recommends \
|
||||||
autoconf automake gdisk libtool bash-completion \
|
autoconf automake gdisk libtool bash-completion \
|
||||||
sudo reprepro python3 binfmt-support e2fsprogs \
|
reprepro python3 binfmt-support e2fsprogs \
|
||||||
umoci skopeo \
|
umoci skopeo \
|
||||||
multistrap qemu-user-static debootstrap quilt && \
|
multistrap qemu-user-static debootstrap quilt && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
RUN echo "builder ALL=NOPASSWD: ALL" > /etc/sudoers.d/builder-nopasswd && \
|
|
||||||
chmod 660 /etc/sudoers.d/builder-nopasswd
|
|
||||||
|
|
||||||
RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy\"" \
|
|
||||||
> /etc/sudoers.d/env_keep && chmod 660 /etc/sudoers.d/env_keep
|
|
||||||
|
|
||||||
RUN sed -i 's|#!/bin/bash|\0\n\nupdate-binfmts --enable \&\& [ -f /proc/sys/fs/binfmt_misc/status ]|' /kas/container-entrypoint
|
RUN sed -i 's|#!/bin/bash|\0\n\nupdate-binfmts --enable \&\& [ -f /proc/sys/fs/binfmt_misc/status ]|' /kas/container-entrypoint
|
||||||
|
Loading…
x
Reference in New Issue
Block a user