1
- ARG base_image
1
+ ARG base_image=cgr.dev/chainguard/wolfi-base:latest
2
2
3
- FROM ${base_image} AS resource
4
- USER root
5
-
6
- RUN apt update && apt upgrade -y -o Dpkg::Options::="--force-confdef"
7
- RUN apt install -y --no-install-recommends \
8
- curl \
3
+ FROM ${base_image} AS proxytunnel
4
+ RUN apk --no-cache add \
9
5
git \
10
- git-lfs \
11
- gnupg \
12
- gzip \
13
- jq \
14
- openssl \
15
- libssl-dev \
16
6
make \
17
- g++ \
18
- openssh-client \
19
- libstdc++6 \
20
- software-properties-common
7
+ gcc \
8
+ openssl-dev
21
9
22
10
WORKDIR /root
23
11
RUN git clone https://github.com/proxytunnel/proxytunnel.git && \
24
12
cd proxytunnel && \
25
- make -j4 && \
26
- install -c proxytunnel /usr/bin/proxytunnel && \
27
- cd .. && \
28
- rm -rf proxytunnel
13
+ make -j4
14
+
15
+ FROM ${base_image} AS resource
16
+ COPY --from=proxytunnel /root/proxytunnel/proxytunnel /usr/bin/
17
+
18
+ # minimum dependencies we need for the resource
19
+ RUN apk --no-cache add \
20
+ bash \
21
+ ca-certificates \
22
+ coreutils \
23
+ git \
24
+ git-crypt \
25
+ git-lfs \
26
+ gnupg \
27
+ gnupg-dirmngr \
28
+ gpg \
29
+ gpg-agent \
30
+ jq \
31
+ openssh
29
32
30
33
RUN git config --global user.email "git@localhost"
31
34
RUN git config --global user.name "git"
32
35
RUN git config --global pull.rebase "false"
33
36
RUN git config --global protocol.file.allow "always"
34
37
35
- ENV CXXFLAGS -DOPENSSL_API_COMPAT=0x30000000L
36
- ADD scripts/install_git_crypt.sh install_git_crypt.sh
37
- RUN ./install_git_crypt.sh && rm ./install_git_crypt.sh
38
-
39
- WORKDIR /usr/libexec/git-core
40
- RUN rm -f \
41
- git-add \
42
- git-add--interactive \
43
- git-annotate \
44
- git-apply \
45
- git-archimport \
46
- git-archive \
47
- git-bisect--helper \
48
- git-blame \
49
- git-branch \
50
- git-bundle \
51
- git-credential-cache \
52
- git-credential-cache--daemon \
53
- git-credential-store \
54
- git-cat-file \
55
- git-check-attr \
56
- git-check-ignore \
57
- git-check-mailmap \
58
- git-check-ref-format \
59
- git-checkout \
60
- git-checkout-index \
61
- git-cherry \
62
- git-cherry-pick \
63
- git-clean \
64
- git-clone \
65
- git-column \
66
- git-commit \
67
- git-commit-tree \
68
- git-config \
69
- git-count-objects \
70
- git-credential \
71
- git-cvsexportcommit \
72
- git-cvsimport \
73
- git-cvsserver \
74
- git-describe \
75
- git-diff \
76
- git-diff-files \
77
- git-diff-index \
78
- git-diff-tree \
79
- git-difftool \
80
- git-fast-export \
81
- git-fast-import \
82
- git-fetch \
83
- git-fetch-pack \
84
- git-fmt-merge-msg \
85
- git-for-each-ref \
86
- git-format-patch \
87
- git-fsck \
88
- git-fsck-objects \
89
- git-gc \
90
- git-get-tar-commit-id \
91
- git-grep \
92
- git-hash-object \
93
- git-help \
94
- git-http-backend\
95
- git-imap-send \
96
- git-index-pack \
97
- git-init \
98
- git-init-db \
99
- git-lfs \
100
- git-log \
101
- git-ls-files \
102
- git-ls-remote \
103
- git-ls-tree \
104
- git-mailinfo \
105
- git-mailsplit \
106
- git-merge \
107
- git-mktag \
108
- git-mktree \
109
- git-mv \
110
- git-name-rev \
111
- git-notes \
112
- git-p4 \
113
- git-pack-objects \
114
- git-pack-redundant \
115
- git-pack-refs \
116
- git-patch-id \
117
- git-peek-remote \
118
- git-prune \
119
- git-prune-packed \
120
- git-push \
121
- git-read-tree \
122
- git-reflog \
123
- git-relink \
124
- git-remote \
125
- git-remote-ext \
126
- git-remote-fd \
127
- git-remote-testsvn \
128
- git-repack \
129
- git-replace \
130
- git-repo-config \
131
- git-rerere \
132
- git-reset \
133
- git-rev-list \
134
- git-rev-parse \
135
- git-revert \
136
- git-rm \
137
- git-send-email \
138
- git-send-pack \
139
- git-shortlog \
140
- git-show \
141
- git-show-branch \
142
- git-show-index \
143
- git-show-ref \
144
- git-stage \
145
- git-show-ref \
146
- git-stage \
147
- git-status \
148
- git-stripspace \
149
- git-svn \
150
- git-symbolic-ref \
151
- git-tag \
152
- git-tar-tree \
153
- git-unpack-file \
154
- git-unpack-objects \
155
- git-update-index \
156
- git-update-ref \
157
- git-update-server-info \
158
- git-upload-archive \
159
- git-var \
160
- git-verify-pack \
161
- git-verify-tag \
162
- git-whatchanged \
163
- git-write-tree
164
-
165
- WORKDIR /usr/bin
166
- RUN rm -f \
167
- git-cvsserver \
168
- git-shell \
169
- git-receive-pack \
170
- git-upload-pack \
171
- git-upload-archive &&\
172
- ln -s git git-upload-archive &&\
173
- ln -s git git-merge &&\
174
- ln -s git git-crypt
38
+ # Remove unrelated git binaries we don't need
39
+ WORKDIR /usr/libexec/git-core
40
+ RUN rm -f \
41
+ git-archimport \
42
+ git-cvsexportcommit \
43
+ git-cvsimport \
44
+ git-cvsserver \
45
+ git-svn \
46
+ git-web--browse
175
47
176
- WORKDIR /usr/share
177
- RUN rm -rf \
178
- gitweb \
179
- locale \
180
- perl
48
+ WORKDIR /usr/bin
49
+ RUN rm -f git-cvsserver
181
50
182
- WORKDIR /usr/lib
183
- RUN rm -rf \
184
- perl
51
+ WORKDIR /usr/share
52
+ RUN rm -rf locale
185
53
186
54
ADD assets/ /opt/resource/
187
55
RUN chmod +x /opt/resource/*
@@ -191,7 +59,7 @@ ADD test/ /tests
191
59
RUN /tests/all.sh
192
60
193
61
FROM resource AS integrationtests
194
- RUN apt update && apt install -y iproute2 squid
62
+ RUN apk --no-cache add iproute2 squid
195
63
ADD test/ /tests/test
196
64
ADD integration-tests /tests/integration-tests
197
65
RUN /tests/integration-tests/integration.sh
0 commit comments