Skip to content

Commit 82ddf59

Browse files
committed
Update Dockerfile to use Alpine, and tweak docs
1 parent b7c9f37 commit 82ddf59

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
openssl

Dockerfile

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
FROM ubuntu:18.04
1+
FROM alpine:latest
22

3-
# Install nginx for some tests.
4-
# Install strace for potential debugging, and rsyslog to enable system log gathering.
5-
RUN apt-get update
6-
RUN apt-get install -y ca-certificates build-essential git zlib1g-dev openssl
7-
RUN apt-get clean
3+
RUN apk update
4+
RUN apk add gcc make ca-certificates git libc-dev linux-headers openssl perl zlib-dev
85

96
RUN update-ca-certificates
10-
ADD . builddir
7+
ADD . builddir
118
RUN cd builddir; make static; cp /builddir/sslscan /usr/local/bin
129

1310
ENTRYPOINT ["sslscan"]
14-
15-
EXPOSE 443

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ openssl/libcrypto.a: openssl/Makefile
155155
static: openssl/libcrypto.a
156156
$(MAKE) -j $(NUM_PROCS) sslscan STATIC_BUILD=TRUE
157157

158-
build-image:
158+
docker:
159159
docker build -t sslscan:sslscan .
160160

161161
test: static

README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,18 @@ This will clone the [OpenSSL repository](https://github.com/openssl/openssl), an
9191
**Please note:** Out of the box, OpenSSL cannot compiled with `clang` without further customization (which is not done by the provided `Makefile`). For more information on this, see [Modifying Build Settings](http://wiki.openssl.org/index.php/Compilation_and_Installation#Modifying_Build_Settings) in the OpenSSL wiki.
9292

9393
You can verify whether you have a statically linked OpenSSL version, by checking whether the version listed by `sslscan --version` has the `-static` suffix.
94-
### Building with docker
9594

96-
Install docker on your linux.
95+
### Building with Docker
96+
97+
Ensure that you local Docker installation is functional, and the build the container with:
98+
99+
make docker
100+
101+
Or manually with:
97102

98103
docker build -t sslscan:sslscan .
99104

100-
to use it
105+
You can then run sslscan with:
101106

102107
docker run --rm -ti sslscan:sslscan --help
103108

0 commit comments

Comments
 (0)