Skip to content

Instantly share code, notes, and snippets.

@jsf9k
Last active March 16, 2018 15:37
Show Gist options
  • Select an option

  • Save jsf9k/766679672229a0a84d768b1bca0b2d28 to your computer and use it in GitHub Desktop.

Select an option

Save jsf9k/766679672229a0a84d768b1bca0b2d28 to your computer and use it in GitHub Desktop.
Dockerfile for installing nassl on Alpine Linux
FROM python:3.6.4-alpine3.7
MAINTAINER Shane Frasier <jeremy.frasier@beta.dhs.gov>
# Install git so we can checkout the nassl git repo.
#
# Also install build-base, libffi, libffi-dev, openssl, and
# openssl-dev since they are needed to build some of the dependencies
# of domain-scan. With the exception of libffi and openssl, these are
# all build dependencies that can be removed at the end.
RUN apk update && apk upgrade
RUN apk --no-cache add git \
build-base \
libffi libffi-dev \
openssl openssl-dev
##
# Make sure pip and setuptools are the latest versions
##
RUN pip install --upgrade pip setuptools
# Install nassl
RUN git clone https://github.com/nabla-c0d3/nassl.git
WORKDIR nassl
RUN pip install -r requirements.txt
RUN python setup.py build_ext -i
RUN python run_tests.py
FROM python:3.6.4-alpine3.7
MAINTAINER Shane Frasier <jeremy.frasier@beta.dhs.gov>
# Install git so we can checkout the nassl git repo.
#
# Also install build-base, libffi, libffi-dev, openssl, and
# openssl-dev since they are needed to build some of the dependencies
# of domain-scan. With the exception of libffi and openssl, these are
# all build dependencies that can be removed at the end.
RUN apk update && apk upgrade
RUN apk --no-cache add git \
build-base \
libffi libffi-dev \
openssl openssl-dev \
perl linux-headers
##
# Make sure pip and setuptools are the latest versions
##
RUN pip install --upgrade pip setuptools
# Install nassl
RUN git clone https://github.com/nabla-c0d3/nassl.git
WORKDIR nassl
RUN pip install -r requirements.txt
RUN wget http://zlib.net/zlib-1.2.11.tar.gz
RUN tar xvfz zlib-1.2.11.tar.gz
RUN wget https://ftp.openssl.org/source/old/1.0.2/openssl-1.0.2e.tar.gz
RUN tar xvfz openssl-1.0.2e.tar.gz
RUN git clone -b tls1.3-draft-18 https://github.com/openssl/openssl.git ./openssl-master
RUN python build_from_scratch.py
RUN python setup.py build_ext -i
RUN python run_tests.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment