File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -30,5 +30,10 @@ RUN pip3 install --no-cache-dir /tmp/wheelhouse/*.whl \
30
30
COPY ./docker/git-credential-env /usr/local/bin/git-credential-env
31
31
RUN git config --system credential.helper env
32
32
33
+ # add entrypoint
34
+ COPY ./docker/entrypoint /usr/local/bin/entrypoint
35
+ RUN chmod +x /usr/local/bin/entrypoint
36
+ ENTRYPOINT ["/usr/local/bin/entrypoint" ]
37
+
33
38
# Used for testing purpose in ports.py
34
39
EXPOSE 52000
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -e
3
+
4
+ function write_config() {
5
+ # Checks for the environment variables *_PROXY.
6
+ # If at least one variables is found, it writes all found variables
7
+ # into a docker config file
8
+ docker_cfg=" $1 "
9
+ httpProxy=" ${HTTP_PROXY:- $http_proxy } "
10
+ httpsProxy=" ${HTTPS_PROXY:- $https_proxy } "
11
+ noProxy=" ${NO_PROXY:- $no_proxy } "
12
+ # If no proxy vars are set, do nothing
13
+ [ -z " $httpProxy " ] && [ -z " $httpsProxy " ] && [ -z " $noProxy " ] && return
14
+ [ -f " $1 " ] && echo " $1 already exists. Not touching it. You are responsible for setting your proxy vars there yourself" >&2 && return
15
+ sep=" "
16
+ mkdir -p " $( dirname $docker_cfg ) "
17
+ cat << EOF > "$docker_cfg "
18
+ {
19
+ "proxies": {
20
+ "default": {
21
+ EOF
22
+ [ -n " $httpProxy " ] && echo -ne " $sep " ' "httpProxy": "' " $httpProxy " ' "' >> " $docker_cfg " && sep=" ,\n"
23
+ [ -n " $httpsProxy " ] && echo -ne " $sep " ' "httpsProxy": "' " $httpsProxy " ' "' >> " $docker_cfg " && sep=" ,\n"
24
+ [ -n " $noProxy " ] && echo -ne " $sep " ' "noProxy": "' " $noProxy " ' "' >> " $docker_cfg " && sep=" ,\n"
25
+ cat << EOF >> "$docker_cfg "
26
+
27
+ }
28
+ }
29
+ }
30
+ EOF
31
+ }
32
+
33
+ write_config /root/.docker/config.json
34
+
35
+ exec " $@ "
You can’t perform that action at this time.
0 commit comments