-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
53 lines (45 loc) · 1.56 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
# BUILD TRANSMISSION PACKAGE FOR DEBIAN AFTER APPLYING PATCHES
# https://github.com/sio/transmission-debian-patched
# Stage 1. Heavy build environment
FROM debian:bullseye-slim AS build
LABEL github=sio/transmission-debian-patched
WORKDIR /build
RUN \
chown 100001:100001 . && \
apt-get update && \
apt-get install --no-install-recommends -y \
devscripts \
quilt \
software-properties-common \
&& \
add-apt-repository --enable-source 'http://deb.debian.org/debian' && \
apt-get update && \
apt-get build-dep --no-install-recommends -y transmission && \
apt-get clean
ENV QUILT_PATCHES="debian/patches"
ENV QUILT_PATCH_OPTS="--reject-format=unified"
ENV QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto"
ENV QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
ENV QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33"
USER 100001:100001
COPY *.patch /build/
RUN \
apt-get source transmission && \
rm ./*.debian.tar.xz ./*.dsc && \
cd transmission-* && \
quilt push -a ; \
quilt import /build/*.patch && \
quilt pop -a && \
DEBEMAIL="Vitaly Potyarkin <[email protected]>" debchange --nmu \
"Backported some patches to stable version of transmission" \
&& \
debuild -us -uc
# Stage 2. Publish artifacts to empty container
FROM scratch
LABEL github=sio/transmission-debian-patched
COPY --from=build \
/build/*.deb \
/build/*.tar.xz \
/build/*.dsc \
/packages/
CMD ["There are no executables in this container"]