CaliDog/certstream-server

Issue building Dockerfile

Closed this issue · 2 comments

Hi,

Thanks for the amazing tool/service. I've been using the generously provided main service for a while, but there seem to have been some issues in the last day or so. I felt guilty about relying on it, so I thought I'd run my own.

I cloned master (606202f at the time of writing) and tried building the Docker image and got the following output. I'm new to Elixir so I haven't yet figured out what the issue is. Any ideas?

git clone https://github.com/CaliDog/certstream-server.git
Cloning into 'certstream-server'...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 605 (delta 4), reused 10 (delta 2), pack-reused 585
Receiving objects: 100% (605/605), 74.87 MiB | 8.26 MiB/s, done.
Resolving deltas: 100% (249/249), done.
12:20:22 oss $ cd certstream-server/
12:20:26 certstream-server $ docker build -t certstream .
Sending build context to Docker daemon  164.3MB
Step 1/15 : FROM elixir:1.6-alpine
1.6-alpine: Pulling from library/elixir
31603596830f: Pull complete 
2779131194c0: Pull complete 
ebe990fffdc0: Pull complete 
Digest: sha256:7e856ef3830cee75c5e5a214f93c703b108f8d8a4dd33dcdd9eec5b6e35f5726
Status: Downloaded newer image for elixir:1.6-alpine
 ---> 2d5e1d7be660
Step 2/15 : WORKDIR /opt/app
 ---> Running in c8fd09e277e4
Removing intermediate container c8fd09e277e4
 ---> 5be831f5f471
Step 3/15 : ENV HOME /opt/app
 ---> Running in 7561b8242f5b
Removing intermediate container 7561b8242f5b
 ---> 62f37fa97f12
Step 4/15 : ENV MIX_HOME=/opt/mix
 ---> Running in 56df440f5a25
Removing intermediate container 56df440f5a25
 ---> c72ee242b081
Step 5/15 : ENV HEX_HOME=/opt/hex
 ---> Running in 64a0d7c6d704
Removing intermediate container 64a0d7c6d704
 ---> 87b287078e57
Step 6/15 : ENV MIX_ENV=prod
 ---> Running in 335fd82c9d23
Removing intermediate container 335fd82c9d23
 ---> a6fdfefdcb69
Step 7/15 : RUN apk add git
 ---> Running in c4428e850837
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/6) Installing nghttp2-libs (1.35.1-r2)
(2/6) Installing libssh2 (1.9.0-r1)
(3/6) Installing libcurl (7.64.0-r3)
(4/6) Installing expat (2.2.8-r0)
(5/6) Installing pcre2 (10.32-r1)
(6/6) Installing git (2.20.4-r0)
Executing busybox-1.29.3-r10.trigger
OK: 29 MiB in 28 packages
Removing intermediate container c4428e850837
 ---> 3dc407d45fcc
Step 8/15 : RUN mix local.hex --force && mix local.rebar --force
 ---> Running in aefab14c9019
* creating /opt/mix/archives/hex-0.20.5
* creating /opt/mix/rebar
* creating /opt/mix/rebar3
Removing intermediate container aefab14c9019
 ---> e42cbdb16463
Step 9/15 : ADD mix.exs ./
 ---> a1bcd0f98e11
Step 10/15 : ADD mix.lock ./
 ---> 47a22652aee4
Step 11/15 : RUN mix do deps.get, deps.compile
 ---> Running in bd49284d7013
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
  bunt 0.2.0
  certifi 2.5.2
  cowboy 2.8.0
  cowlib 2.9.1
  credo 1.4.0
  decimal 1.8.1
  easy_ssl 1.1.2
  excoveralls 0.13.0
  hackney 1.16.0
  honeybadger 0.14.1
  httpoison 1.7.0
  idna 6.0.1
  instruments 1.1.3
  jason 1.2.1
  metrics 1.0.1
  mimerl 1.2.0
  number 1.0.1
  parse_trans 3.3.0
  pobox 1.2.0
  ranch 1.7.1
  recon 2.3.6
  ssl_verify_fun 1.1.6
  statix 1.2.1
  telemetry 0.4.2
  unicode_util_compat 0.5.0
* Getting cowboy (Hex package)
* Getting easy_ssl (Hex package)
* Getting honeybadger (Hex package)
* Getting httpoison (Hex package)
* Getting instruments (Hex package)
* Getting jason (Hex package)
* Getting number (Hex package)
* Getting pobox (Hex package)
* Getting credo (Hex package)
* Getting excoveralls (Hex package)
* Getting hackney (Hex package)
* Getting certifi (Hex package)
* Getting idna (Hex package)
* Getting metrics (Hex package)
* Getting mimerl (Hex package)
* Getting parse_trans (Hex package)
* Getting ssl_verify_fun (Hex package)
* Getting unicode_util_compat (Hex package)
* Getting bunt (Hex package)
* Getting decimal (Hex package)
* Getting recon (Hex package)
* Getting statix (Hex package)
* Getting telemetry (Hex package)
* Getting cowlib (Hex package)
* Getting ranch (Hex package)
===> Compiling parse_trans
==> statix
Compiling 3 files (.ex)
Generated statix app
===> Compiling mimerl
===> Compiling metrics
===> Compiling unicode_util_compat
===> Compiling idna
===> Compiling ranch
===> Compiling telemetry
==> decimal
Compiling 1 file (.ex)
Generated decimal app
==> number
Compiling 9 files (.ex)
Generated number app
==> jason
Compiling 8 files (.ex)
Generated jason app
===> Compiling recon
==> instruments
Compiling 17 files (.ex)
Generated instruments app
==> ssl_verify_fun
Compiling 7 files (.erl)
Generated ssl_verify_fun app
===> Fetching rebar3_proper v0.12.0
===> Downloaded package, caching at /opt/app/.cache/rebar3/hex/hexpm/packages/rebar3_proper-0.12.0.tar
===> Compiling rebar3_proper
===> Compiling pobox
===> Compiling certifi
===> Compiling hackney
warning: the dependency :honeybadger requires Elixir "~> 1.7" but you are running on v1.6.6
==> honeybadger
Compiling 19 files (.ex)
Generated honeybadger app
==> easy_ssl
Compiling 1 file (.ex)
Generated easy_ssl app
==> httpoison
warning: the dependency :httpoison requires Elixir "~> 1.8" but you are running on v1.6.6
Compiling 3 files (.ex)
Generated httpoison app
===> Compiling cowlib
===> Compiling cowboy
===> Compiling src/cowboy_http2.erl failed
src/cowboy_http2.erl:397: illegal pattern
src/cowboy_http2.erl:400: variable 'Exception' is unbound
src/cowboy_http2.erl:400: variable 'Stacktrace' is unbound
src/cowboy_http2.erl:504: illegal pattern
src/cowboy_http2.erl:507: variable 'Exception' is unbound
src/cowboy_http2.erl:507: variable 'Stacktrace' is unbound
src/cowboy_http2.erl:531: illegal pattern
src/cowboy_http2.erl:534: variable 'Exception' is unbound
src/cowboy_http2.erl:534: variable 'Stacktrace' is unbound
src/cowboy_http2.erl:592: illegal pattern
src/cowboy_http2.erl:595: variable 'Exception' is unbound
src/cowboy_http2.erl:595: variable 'Stacktrace' is unbound
src/cowboy_http2.erl:1124: illegal pattern
src/cowboy_http2.erl:1127: variable 'Exception' is unbound
src/cowboy_http2.erl:1127: variable 'Stacktrace' is unbound

==> certstream
** (Mix) Could not compile dependency :cowboy, "/opt/mix/rebar3 bare compile --paths "/opt/app/_build/prod/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile cowboy", update it with "mix deps.update cowboy" or clean it with "mix 

So I tried googling around and found this message that says:

You have to update your Erlang/OTP version on the server to at least Erlang/OTP 21 or downgrade the cowboy version.

I then looked on Docker Hub and saw a base image tagged elixir:1.6-otp-21-alpine. I tried changing the base image for certstream to this and it built and seems to work. I submitted #40 for it

Should be resolved with #44!