Switch from Ubuntu 14.04 to CentOS 7

This commit is contained in:
Janek Bevendorff
2017-10-21 17:02:46 +02:00
parent 76ac8dda54
commit 94ea91ec63
2 changed files with 55 additions and 34 deletions

View File

@@ -14,50 +14,68 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
FROM ubuntu:14.04
FROM centos:7
RUN set -x \
&& apt-get update \
&& apt-get install --yes software-properties-common
&& curl "https://copr.fedorainfracloud.org/coprs/bugzy/keepassxc/repo/epel-7/bugzy-keepassxc-epel-7.repo" \
> /etc/yum.repos.d/bugzy-keepassxc-epel-7.repo
RUN set -x \
&& add-apt-repository ppa:george-edison55/cmake-3.x
ENV QT_PPA=qt591
ENV QT_VERSION=qt59
&& curl "https://copr.fedorainfracloud.org/coprs/sic/backports/repo/epel-7/sic-backports-epel-7.repo" \
> /etc/yum.repos.d/sic-backports-epel-7.repo
RUN set -x \
&& add-apt-repository --yes ppa:beineri/opt-${QT_PPA}-trusty
&& yum clean -y all \
&& yum upgrade -y
# build and runtime dependencies
RUN set -x \
&& apt-get update \
&& apt-get install --yes \
g++ \
&& yum install -y \
make \
automake \
gcc-c++ \
cmake \
libgcrypt20-dev \
${QT_VERSION}base \
${QT_VERSION}tools \
${QT_VERSION}x11extras \
libxi-dev \
libxtst-dev \
zlib1g-dev \
libyubikey-dev \
libykpers-1-dev \
xvfb \
wget \
file \
fuse \
python
libgcrypt16-devel \
qt5-qtbase-devel \
qt5-linguist \
qt5-qttools \
zlib-devel \
qt5-qtx11extras \
qt5-qtx11extras-devel \
libXi-devel \
libXtst-devel
# AppImage dependencies
RUN set -x \
&& apt-get install --yes mesa-common-dev
&& yum install -y \
wget \
fuse-libs
# build libyubikey
ENV YUBIKEY_VERSION=1.13
RUN set -x && yum install -y libusb-devel
RUN set -x \
&& wget "https://developers.yubico.com/yubico-c/Releases/libyubikey-${YUBIKEY_VERSION}.tar.gz" \
&& tar xf libyubikey-${YUBIKEY_VERSION}.tar.gz \
&& cd libyubikey-${YUBIKEY_VERSION} \
&& ./configure --prefix=/usr --libdir=/usr/lib64 \
&& make \
&& make install \
&& cd .. \
&& rm -Rf libyubikey-${YUBIKEY_VERSION}*
# build libykpers-1
ENV YKPERS_VERSION=1.18.0
RUN set -x \
&& wget "https://developers.yubico.com/yubikey-personalization/Releases/ykpers-${YKPERS_VERSION}.tar.gz" \
&& tar xf ykpers-${YKPERS_VERSION}.tar.gz \
&& cd ykpers-${YKPERS_VERSION} \
&& ./configure --prefix=/usr --libdir=/usr/lib64 \
&& make \
&& make install \
&& cd .. \
&& rm -Rf ykpers-${YKPERS_VERSION}*
VOLUME /keepassxc/src
VOLUME /keepassxc/out
WORKDIR /keepassxc
ENV CMAKE_PREFIX_PATH=/opt/${QT_VERSION}/lib/cmake
ENV LD_LIBRARY_PATH=/opt/${QT_VERSION}/lib
RUN set -x \
&& echo /opt/${QT_VERSION}/lib > /etc/ld.so.conf.d/${QT_VERSION}.conf