-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96eed10
commit 58fc6c9
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# SLE12-SP5 is officially not available at the Docker Hub | ||
# because of some licensing issues, use openSUSE-42.3 as a replacement | ||
# as there is no openSUSE-42.5 release which would be the equivalent to SLES12-SP5. | ||
# It shares the same core packages and should be close enough to SLE12-SP5 | ||
# for running the libyui builds. | ||
FROM opensuse:42.3 | ||
|
||
# ensure the UTF-8 locales are set | ||
ENV LC_ALL=en_US.UTF-8 | ||
|
||
# do not install the files marked as documentation (use "rpm --excludedocs") | ||
RUN sed -i -e "s/^.*rpm.install.excludedocs.*/rpm.install.excludedocs = yes/" /etc/zypp/zypp.conf | ||
|
||
# the NON-OSS repo is not needed, save the network bandwidth and some time (~5 seconds) for each refresh | ||
RUN zypper mr -d "NON OSS" | ||
|
||
# we need to install Ruby first to define the %{rb_default_ruby_abi} RPM macro | ||
# see https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#run | ||
# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/build-cache | ||
# why we need "zypper clean -a" at the end | ||
# "curl" is needed for importing the GPG key by "rpm" command | ||
RUN zypper --non-interactive in --no-recommends \ | ||
curl ruby && zypper clean -a | ||
|
||
# Reuse the YaST SP5 repository, we do not want to maintain extra devel:libraries:libyui:SLE-12:SP5 | ||
# subproject. | ||
# | ||
# Set a higher priority for the sle_12_sp5 repo to prefer the packages from | ||
# this repo even if they have a lower version than the original 42.3 packages. | ||
RUN zypper ar -f -p 95 https://download.opensuse.org/repositories/YaST:/SLE-12:/SP5/openSUSE_Leap_42.3/ \ | ||
sle12_sp5 | ||
|
||
# import the YaST OBS GPG key | ||
RUN rpm --import https://build.opensuse.org/projects/YaST/public_key | ||
|
||
RUN RUBY_VERSION=`rpm --eval '%{rb_default_ruby_abi}'` && \ | ||
zypper --gpg-auto-import-keys --non-interactive in --no-recommends \ | ||
boost-devel \ | ||
cmake \ | ||
doxygen \ | ||
fontconfig-devel \ | ||
gcc-c++ \ | ||
git \ | ||
gtk3-devel \ | ||
libyui-devel \ | ||
libyui-ncurses-devel \ | ||
libyui-qt-devel \ | ||
libzypp-devel \ | ||
obs-service-source_validator \ | ||
pkg-config \ | ||
'pkgconfig(Qt5Core)' \ | ||
'pkgconfig(Qt5Gui)' \ | ||
'pkgconfig(Qt5Svg)' \ | ||
'pkgconfig(Qt5Widgets)' \ | ||
'pkgconfig(Qt5X11Extras)' \ | ||
"rubygem($RUBY_VERSION:libyui-rake)" \ | ||
"rubygem($RUBY_VERSION:rubocop)" \ | ||
rpm-build \ | ||
yast2-devtools \ | ||
which \ | ||
&& zypper clean -a \ | ||
&& rm -rf /usr/lib*/ruby/gems/*/cache \ | ||
&& rm -rf /usr/share/doc/ | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
COPY libyui-travis /usr/local/bin | ||
|
||
# run some smoke tests to make sure there is no serious issue with the image | ||
RUN c++ --version | ||
|
||
# this is a bit tricky as the libyui/rake loads some files at the initialization | ||
RUN mkdir -p package && echo > package/test.spec && \ | ||
echo -e 'SET(VERSION_MAJOR "42")\nSET(VERSION_MINOR "42")\nSET(VERSION_PATCH "42")' \ | ||
> VERSION.cmake && rake -t -r libyui/rake -V && rm -rf package && rm VERSION.cmake |