forked from openSUSE/snapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.tumbleweed
60 lines (52 loc) · 1.82 KB
/
Dockerfile.tumbleweed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Leap and Tumbleweed images differ only in the base image,
# so use a parametrized Dockerfile. See
# https://docs.docker.com/engine/reference/builder/#from
ARG BUILD_FLAVOR
# Build the latest openSUSE Tumbleweed or Leap image
FROM opensuse/${BUILD_FLAVOR}
# the NON-OSS repo is not needed, save the network bandwidth and some time (~5 seconds) for each refresh
RUN zypper mr -d repo-non-oss
# we need to install Ruby first to define the %{rb_ver} 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
RUN zypper --non-interactive in --no-recommends --force-resolution ruby && zypper clean -a
# add the YaST repository - we need rubygem-coveralls-lcov
RUN zypper ar -f http://download.opensuse.org/repositories/YaST:/Head/openSUSE_Tumbleweed/ yast_tw
RUN zypper ar -f http://download.opensuse.org/repositories/YaST:/Head/openSUSE_Leap_15.1_Update/ yast_lp
RUN RUBY_VERSION=ruby:`rpm --eval '%{rb_ver}'` && \
zypper --non-interactive --gpg-auto-import-keys \
in --no-recommends \
"rubygem($RUBY_VERSION:coveralls-lcov)" \
&& zypper clean -a
RUN RUBY_VERSION=ruby:`rpm --eval '%{rb_ver}'` && \
zypper --non-interactive in --no-recommends \
acl \
autoconf \
automake \
dbus-1-devel \
docbook-xsl-stylesheets \
e2fsprogs-devel \
gcc-c++ \
git-core \
grep \
lcov \
libacl-devel \
libboost_system-devel \
libboost_test-devel \
libboost_thread-devel \
libbtrfs-devel \
libjson-c-devel \
libmount-devel \
libtool \
libxml2-devel \
libxslt \
obs-service-source_validator \
pam-devel \
perl-JSON \
rpm-build \
"rubygem($RUBY_VERSION:ruby-dbus)" \
which
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app