HoneyTian commited on
Commit
19b2936
·
1 Parent(s): 1bd6d3c
Files changed (2) hide show
  1. Dockerfile +2 -0
  2. script/install_openssl.sh +63 -0
Dockerfile CHANGED
@@ -7,6 +7,8 @@ COPY . /code
7
  RUN pip install --upgrade pip
8
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
9
 
 
 
10
  RUN useradd -m -u 1000 user
11
 
12
  USER user
 
7
  RUN pip install --upgrade pip
8
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
9
 
10
+ RUN bash script/install_openssl.sh --openssl_version 1.1.1 --system_version ubuntu
11
+
12
  RUN useradd -m -u 1000 user
13
 
14
  USER user
script/install_openssl.sh ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+
3
+ # params:
4
+ system_version="centos";
5
+
6
+ # https://www.openssl.org/source/old/
7
+ openssl_version=1.1.1t
8
+
9
+ # parse options
10
+ while true; do
11
+ [ -z "${1:-}" ] && break; # break if there are no arguments
12
+ case "$1" in
13
+ --*) name=$(echo "$1" | sed s/^--// | sed s/-/_/g);
14
+ eval '[ -z "${'"$name"'+xxx}" ]' && echo "$0: invalid option $1" 1>&2 && exit 1;
15
+ old_value="(eval echo \\$$name)";
16
+ if [ "${old_value}" == "true" ] || [ "${old_value}" == "false" ]; then
17
+ was_bool=true;
18
+ else
19
+ was_bool=false;
20
+ fi
21
+
22
+ # Set the variable to the right value-- the escaped quotes make it work if
23
+ # the option had spaces, like --cmd "queue.pl -sync y"
24
+ eval "${name}=\"$2\"";
25
+
26
+ # Check that Boolean-valued arguments are really Boolean.
27
+ if $was_bool && [[ "$2" != "true" && "$2" != "false" ]]; then
28
+ echo "$0: expected \"true\" or \"false\": $1 $2" 1>&2
29
+ exit 1;
30
+ fi
31
+ shift 2;
32
+ ;;
33
+
34
+ *) break;
35
+ esac
36
+ done
37
+
38
+ echo "system_version: ${system_version}";
39
+
40
+
41
+ if [ ${system_version} = "centos" || ${system_version} = "ubuntu" ]; then
42
+ mkdir -p /data/dep
43
+ cd /data/dep || exit 1;
44
+
45
+ if [ ! -e openssl-${openssl_version}.tar.gz ]; then
46
+ wget "https://www.openssl.org/source/openssl-${openssl_version}.tar.gz" --no-check-certificate
47
+ fi
48
+
49
+ cd /data/dep || exit 1;
50
+ if [ ! -d openssl-${openssl_version} ]; then
51
+ tar -zxvf openssl-${openssl_version}.tar.gz
52
+
53
+ cd /data/dep/openssl-${openssl_version} || exit 1;
54
+ fi
55
+
56
+ mkdir -p /usr/local/openssl
57
+
58
+ ./config --prefix=/usr/local/openssl
59
+ #./Configure --prefix=/usr/local/openssl
60
+
61
+ make -j && make install
62
+
63
+ fi