mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 23:11:57 +00:00
packaging: delint static-build dockerfiles
Removed all errors/warnings pointed out by hadolint version 2.7.0, except for the following ignored rules: - "DL3008 warning: Pin versions in apt get install" - "DL3041 warning: Specify version with `dnf install -y <package>-<version>`" - "DL3033 warning: Specify version with `yum install -y <package>-<version>`" - "DL3048 style: Invalid label key" - "DL3003 warning: Use WORKDIR to switch to a directory" - "DL3018 warning: Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>" - "DL3037 warning: Specify version with zypper install -y <package>[=]<version>" Fixes #3107 Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This commit is contained in:
parent
ae271a7e7b
commit
bc71dd5812
@ -2,19 +2,20 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
FROM ubuntu
|
FROM ubuntu:20.04
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
# kernel deps
|
# kernel deps
|
||||||
RUN apt update
|
RUN apt-get update && \
|
||||||
RUN apt install -y \
|
apt-get install -y --no-install-recommends \
|
||||||
bc \
|
bc \
|
||||||
bison \
|
bison \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
flex \
|
flex \
|
||||||
git \
|
git \
|
||||||
iptables \
|
iptables \
|
||||||
libelf-dev
|
libelf-dev && \
|
||||||
|
if [ "$(uname -m)" = "s390x" ]; then apt-get install -y --no-install-recommends libssl-dev; fi && \
|
||||||
RUN [ "$(uname -m)" = "s390x" ] && apt-get install -y libssl-dev || true
|
apt-get clean && rm -rf /var/lib/lists/
|
||||||
|
@ -12,8 +12,8 @@ WORKDIR /root/qemu
|
|||||||
ARG CACHE_TIMEOUT
|
ARG CACHE_TIMEOUT
|
||||||
RUN echo "$CACHE_TIMEOUT"
|
RUN echo "$CACHE_TIMEOUT"
|
||||||
|
|
||||||
RUN apt-get update && apt-get upgrade -y
|
RUN apt-get update && apt-get upgrade -y && \
|
||||||
RUN apt-get --no-install-recommends install -y \
|
apt-get --no-install-recommends install -y \
|
||||||
apt-utils \
|
apt-utils \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
@ -46,36 +46,33 @@ RUN apt-get --no-install-recommends install -y \
|
|||||||
python \
|
python \
|
||||||
python-dev \
|
python-dev \
|
||||||
rsync \
|
rsync \
|
||||||
zlib1g-dev
|
zlib1g-dev && \
|
||||||
|
if [ "$(uname -m)" != "s390x" ]; then apt-get install -y --no-install-recommends libpmem-dev; fi && \
|
||||||
RUN [ "$(uname -m)" != "s390x" ] && apt-get install -y libpmem-dev || true
|
apt-get clean && rm -rf /var/lib/apt/lists/
|
||||||
|
|
||||||
ARG QEMU_REPO
|
ARG QEMU_REPO
|
||||||
|
|
||||||
RUN cd .. && git clone --depth=1 "${QEMU_REPO}" qemu
|
|
||||||
|
|
||||||
# commit/tag/branch
|
# commit/tag/branch
|
||||||
ARG QEMU_VERSION
|
ARG QEMU_VERSION
|
||||||
|
|
||||||
RUN git fetch --depth=1 origin "${QEMU_VERSION}" && git checkout FETCH_HEAD
|
|
||||||
RUN scripts/git-submodule.sh update meson capstone
|
|
||||||
|
|
||||||
ADD scripts/configure-hypervisor.sh /root/configure-hypervisor.sh
|
|
||||||
ADD qemu /root/kata_qemu
|
|
||||||
ADD scripts/apply_patches.sh /root/apply_patches.sh
|
|
||||||
ADD scripts/patch_qemu.sh /root/patch_qemu.sh
|
|
||||||
|
|
||||||
RUN /root/patch_qemu.sh "${QEMU_VERSION}" "/root/kata_qemu/patches"
|
|
||||||
|
|
||||||
ARG PREFIX
|
ARG PREFIX
|
||||||
ARG BUILD_SUFFIX
|
ARG BUILD_SUFFIX
|
||||||
RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s "kata-qemu${BUILD_SUFFIX}" | xargs ./configure \
|
|
||||||
--with-pkgversion="kata-static${BUILD_SUFFIX}"
|
|
||||||
|
|
||||||
RUN make -j$(nproc)
|
|
||||||
ARG QEMU_DESTDIR
|
ARG QEMU_DESTDIR
|
||||||
RUN make install DESTDIR="${QEMU_DESTDIR}"
|
|
||||||
ARG QEMU_TARBALL
|
ARG QEMU_TARBALL
|
||||||
ADD static-build/scripts/qemu-build-post.sh /root/static-build/scripts/qemu-build-post.sh
|
|
||||||
ADD static-build/qemu.blacklist /root/static-build/qemu.blacklist
|
COPY scripts/configure-hypervisor.sh /root/configure-hypervisor.sh
|
||||||
RUN /root/static-build/scripts/qemu-build-post.sh
|
COPY qemu /root/kata_qemu
|
||||||
|
COPY scripts/apply_patches.sh /root/apply_patches.sh
|
||||||
|
COPY scripts/patch_qemu.sh /root/patch_qemu.sh
|
||||||
|
COPY static-build/scripts/qemu-build-post.sh /root/static-build/scripts/qemu-build-post.sh
|
||||||
|
COPY static-build/qemu.blacklist /root/static-build/qemu.blacklist
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
RUN git clone --depth=1 "${QEMU_REPO}" qemu && \
|
||||||
|
cd qemu && \
|
||||||
|
git fetch --depth=1 origin "${QEMU_VERSION}" && git checkout FETCH_HEAD && \
|
||||||
|
scripts/git-submodule.sh update meson capstone && \
|
||||||
|
/root/patch_qemu.sh "${QEMU_VERSION}" "/root/kata_qemu/patches" && \
|
||||||
|
(PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s "kata-qemu${BUILD_SUFFIX}" | xargs ./configure \
|
||||||
|
--with-pkgversion="kata-static${BUILD_SUFFIX}") && \
|
||||||
|
make -j"$(nproc)" && \
|
||||||
|
make install DESTDIR="${QEMU_DESTDIR}" && \
|
||||||
|
/root/static-build/scripts/qemu-build-post.sh
|
||||||
|
@ -2,18 +2,21 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
FROM ubuntu
|
FROM ubuntu:20.04
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y \
|
apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
make \
|
make \
|
||||||
sudo
|
sudo && \
|
||||||
|
apt-get clean && rm -rf /var/lib/apt/lists/
|
||||||
|
|
||||||
ADD install_go.sh /usr/bin/install_go.sh
|
COPY install_go.sh /usr/bin/install_go.sh
|
||||||
ARG GO_VERSION
|
ARG GO_VERSION
|
||||||
RUN install_go.sh "${GO_VERSION}"
|
RUN install_go.sh "${GO_VERSION}"
|
||||||
ENV PATH=/usr/local/go/bin:${PATH}
|
ENV PATH=/usr/local/go/bin:${PATH}
|
||||||
|
Loading…
Reference in New Issue
Block a user