chromium / badssl.com

:lock: Memorable site for testing clients against bad SSL configs.
https://badssl.com
Apache License 2.0
2.81k stars 190 forks source link

Not able to make serve #405

Closed shadjiiski closed 3 years ago

shadjiiski commented 4 years ago

I just cloned master and tried

make serve

The docker image could not be built because of an old ruby version:

...
Successfully installed ffi-1.11.1
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
    jekyll-sass-converter requires Ruby version >= 2.4.0.
Successfully installed sassc-2.2.0
The command '/bin/sh -c gem install jekyll' returned a non-zero code: 1
Makefile:98: recipe for target 'docker-build' failed
make: *** [docker-build] Error 1

I tried updating the Dockerfile to start from ubuntu:18.04 instead of ubuntu:16.04 (in order to get ruby2.5 instead of ruby2.3) but the command failed again. Probably nginx is also newer in this version of ubuntu, because it rejected a weak certificate:

...
Successfully built 9f29b383e9a9
Successfully tagged badssl:latest
docker run -it -p 80:80 -p 443:443 -p 1000-1024:1000-1024 badssl
nginx: [emerg] SSL_CTX_use_certificate("/var/www/badssl/_site/certs/sets/current/gen/chain/wildcard-md5.pem") failed (SSL: error:140AB18E:SSL routines:SSL_CTX_use_certificate:ca md too weak)
Makefile:102: recipe for target 'docker-run' failed
make: *** [docker-run] Error 1
shawn-lo commented 4 years ago

Encountered same issue, I modified Dockerfile as below as a temporary solution,

# Start with Ubuntu 16.04 (LTS), and build badssl.com up from there
FROM ubuntu:16.04
MAINTAINER April King <april@pokeinthe.io>
EXPOSE 80 443
RUN apt-get update && apt-get install -y apt-transport-https
RUN apt-get install -y software-properties-common
RUN apt-add-repository ppa:brightbox/ruby-ng
RUN apt-get update && apt-get install -y \
    build-essential \
    git \
    libffi-dev \
    make \
    nginx \
    ruby2.4 \
    ruby2.4-dev
RUN gem update --system
RUN gem install jekyll

# Install badssl.com
ADD . badssl.com
WORKDIR badssl.com
RUN make inside-docker

# Start things up!
CMD nginx && tail -f /var/log/nginx/access.log /var/log/nginx/error.log                                                           

I used some others repo to get ruby2.4 and this works for me.