-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathDockerfile
42 lines (37 loc) · 954 Bytes
/
Dockerfile
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
FROM amazonlinux:2.0.20181114
ARG version
ARG snap_version
RUN yum -y update
RUN yum -y install \
autoconf \
automake \
gettext \
git \
glib2-devel \
glibc-static \
indent \
libcap-devel \
libseccomp-devel \
libtool \
libudev-devel \
make \
patch \
pkgconfig \
python-docutils \
rpm-build \
valgrind \
wget \
xfsprogs-devel
RUN amazon-linux-extras install -y golang1.11
RUN mkdir /app
WORKDIR /app
RUN git clone https://github.com/snapcore/snapd.git
WORKDIR /app/snapd
RUN git checkout -b build $snap_version
ADD diff.patch .
RUN patch -p1 < diff.patch
RUN mkdir -p /root/rpmbuild/{SOURCES,SPECS}
WORKDIR /root/rpmbuild
RUN wget https://github.com/snapcore/snapd/archive/$snap_version.tar.gz -O SOURCES/snapd-$snap_version.tar.gz
RUN wget -P SOURCES https://github.com/snapcore/snapd/releases/download/$snap_version/snapd_$snap_version.only-vendor.tar.xz
RUN rpmbuild -bb /app/snapd/packaging/amzn-2/snapd.spec