THRIFT-5641: [build infra] install deps for swift in bionic and focal dockerfile (#2678)
* install deps for swift in bionic and focal dockerfile
* update add -yq for apt-get update
* remove cppcheck version fixes
* use bionic not focal for now
* Revert "use bionic not focal for now"
This reverts commit e3093477f0bf91122957616f1d9c768c675e03dc.
diff --git a/build/docker/ubuntu-bionic/Dockerfile b/build/docker/ubuntu-bionic/Dockerfile
index 679f509..c554c09 100644
--- a/build/docker/ubuntu-bionic/Dockerfile
+++ b/build/docker/ubuntu-bionic/Dockerfile
@@ -16,12 +16,12 @@
#
FROM buildpack-deps:bionic-scm
-MAINTAINER Apache Thrift <dev@thrift.apache.org>
+LABEL MAINTAINER='Apache Thrift <dev@thrift.apache.org>'
ENV DEBIAN_FRONTEND noninteractive
### Add apt repos
-RUN apt-get update && \
+RUN apt-get update -yq && \
apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends --fix-missing \
apt \
@@ -259,7 +259,12 @@
ENV PATH /root/.cargo/bin:$PATH
# Swift on Linux for cross tests
-RUN cd / && \
+RUN apt-get install -yq \
+ libedit-dev \
+ libz3-dev \
+ libpython-dev \
+ libxml2-dev && \
+ cd / && \
wget --quiet https://swift.org/builds/swift-5.1.4-release/ubuntu1804/swift-5.1.4-RELEASE/swift-5.1.4-RELEASE-ubuntu18.04.tar.gz && \
tar xf swift-5.1.4-RELEASE-ubuntu18.04.tar.gz --strip-components=1 && \
rm swift-5.1.4-RELEASE-ubuntu18.04.tar.gz && \
@@ -273,15 +278,11 @@
locale-gen de_DE.UTF-8 && \
update-locale
-# cppcheck-1.82 has a nasty cpp parser bug, so we're using something newer
RUN apt-get install -y --no-install-recommends \
`# Static Code Analysis dependencies` \
cppcheck \
sloccount && \
- pip install flake8 && \
- wget -q "https://launchpad.net/ubuntu/+source/cppcheck/1.83-2/+build/14874703/+files/cppcheck_1.83-2_amd64.deb" && \
- dpkg -i cppcheck_1.83-2_amd64.deb && \
- rm cppcheck_1.83-2_amd64.deb
+ pip install flake8
# NOTE: this does not reduce the image size but adds an additional layer.
# # Clean up