-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (35 loc) · 1.6 KB
/
Dockerfile
File metadata and controls
42 lines (35 loc) · 1.6 KB
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
# This file is part of ssh2-python.
# Copyright (C) 2017-2022 Panos Kittenis and contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
FROM quay.io/pypa/manylinux2010_x86_64
ENV OPENSSL openssl-3.4.0
ENV SYSTEM_LIBSSH2 1
ENV LIBSSH2_VERSION 1.11.1
RUN yum install zlib-devel perl-IPC-Cmd -y
ADD libssh2-${LIBSSH2_VERSION}.tar.gz libssh2-${LIBSSH2_VERSION}.tar.gz
ADD https://www.openssl.org/source/${OPENSSL}.tar.gz ${OPENSSL}.tar.gz
RUN tar -xzf ${OPENSSL}.tar.gz
# Openssl
RUN cd ${OPENSSL} && \
./config --prefix=/usr --openssldir=/usr/openssl threads shared && \
make -j4 && make install
# Libssh2
RUN mkdir -p build_libssh2 && cd build_libssh2 && \
cmake ../libssh2-${LIBSSH2_VERSION}.tar.gz/libssh2-${LIBSSH2_VERSION} \
-DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON \
-DENABLE_CRYPT_NONE=ON -DENABLE_MAC_NONE=ON -DCMAKE_INSTALL_PREFIX=/usr && \
cmake --build . --config Release --target install
RUN rm -rf ${OPENSSL}* build_libssh2 libssh2.tar.gz
VOLUME /var/cache