GithubHelp home page GithubHelp logo

erlef / docker-elixir Goto Github PK

View Code? Open in Web Editor NEW

This project forked from c0b/docker-elixir

47.0 9.0 19.0 171 KB

Official Docker image for Elixir :whale: :turtle: :rocket:

Home Page: http://elixir-lang.org/

Shell 4.54% Dockerfile 95.46%

docker-elixir's Introduction

About this Repo

Build Status Docker Stars Docker Pulls

This is for elixir latest stable image and next -dev image.

REPOSITORY TAG           IMAGE ID            CREATED             SIZE
elixir     v1.5.0-dev-b3e6c54    8948fc7adc11        11 minutes ago      755 MB
elixir     v1.4.0-rc.1-slim      0c49845329c2        29 minutes ago      292.4 MB
elixir     v1.4.0-rc.1           a50b16247e14        32 minutes ago      757 MB
elixir     1.3           9e04e73b74d4        16 minutes ago      766.4 MB
elixir     1.3-slim      7d901dfc3a5e        15 minutes ago      293.9 MB
elixir     1.2           5165c41f0185        6 days ago          773.8 MB
โžธ docker run -it --rm elixir:v1.5.0-dev
Erlang/OTP 19 [erts-8.0] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Interactive Elixir (1.5.0-dev) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> System.version
"1.5.0-dev"
iex(2)> OptionParser.parse(["--verbose", "-v", "-v"], switches: [verbose: :count], aliases: [v: :verbose])
{[verbose: 3], [], []}
iex(2)> OptionParser.parse(["--verbose", "-v", "-v"], switches: [verbose: :count], aliases: [v: :verbose])
{[verbose: 3], [], []}
iex(3)> {opts, _, _} = v(2)
{[verbose: 3], [], []}
iex(4)> OptionParser.to_argv(opts, switches: [verbose: :count])
["--verbose", "--verbose", "--verbose"]
iex(5)>

How to get the latest elixir

All the elixir's upstream stable versions are pushed over docker official hub (https://hub.docker.com/_/elixir/), while rc images and the latest development version are not; Like this 1.5.0-dev image, if you want to get the latest bleeding edge elixir code from master branch, you may get its git commit id (https://github.com/elixir-lang/elixir/) and sha256, modify the 1.5/Dockerfile locally and build it:

$ docker build -t elixir:1.5.0-dev ./1.5
[...]

docker-elixir's People

Contributors

adamu avatar alexmarold avatar alexriedler avatar bgentry avatar bkerley avatar blatyo avatar bryannaegele avatar c0b avatar cgrothaus avatar clekstro avatar cluster avatar connorlay avatar corybuecker avatar duksis avatar edevil avatar emerleite avatar getong avatar gigitsu avatar halfdan avatar jc00ke avatar kianmeng avatar kronicdeth avatar kwojtaszek avatar maennchen avatar michelboaventura avatar nathany-copia avatar ryvasquez avatar sdwolfz avatar tianon avatar up2jj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-elixir's Issues

elixir:1.14-alpine crashes silently when running in certain situations

I just moved from elixir:1.13-alpine to 1.14.
Mostly it works fine, except when run one specific way.

My container set is built two ways, and only one variant causes this problem:

  1. One container is built with the application as a release. This container works fine when running the service.
  2. Another container is built (for debug purposes) with just the application as a mix project pre-release.
  3. Running the debug container standalone with 'mix start' (what starts our service) and it runs fine
  4. Running the debug container as a docker swarm service with the entrypoint being 'sleep 50000000' (to get an idle background container); THEN, running 'docker exec -it {id} /bin/bash' to get into the container, and running any erlang/elixir/iex/mix command will cause the entire container to exit, with NO COMMAND OUTPUT, which is extremely curious. This happens running 'iex' and 'erlang' as well.

I can run other alpine commands (ps, ls, etc) with no problem.
I can install python and have it grab tons of memory (I killed it after 8G) and it isn't OOMkilled.

Enabling debug in docker didn't show any valuable info. The container is just exiting of its own choice:

May 24 15:39:15 devops dockerd[9801]: time="2023-05-24T15:39:15.286999909Z" level=debug msg=event module=libcontainerd namespace=moby topic=/tasks/exit
May 24 15:39:15 devops dockerd[9801]: time="2023-05-24T15:39:15.287297582Z" level=debug msg="attach: stdout: end"
May 24 15:39:15 devops dockerd[9801]: time="2023-05-24T15:39:15.287320222Z" level=debug msg="attach: stdin: end"
May 24 15:39:15 devops dockerd[9801]: time="2023-05-24T15:39:15.287337073Z" level=debug msg="attach done"

Running Docker version 24.0.1, build 6802122

For now I've switched the base container for the debug image to be elixir 1.13, as this is a head-scratcher to me. It's clearly something w/erlang in the container, but I don't know how it'd be killing itself. Highly unusual.

Proposal: Create aliases for default OTP versions

In my CI script, it would be handy to specify not only the elixir version but also the OTP version explicitly.

So, for example, for the latest elixir release, it would be handy to have 1.14.4-otp-25 alongside the already existing 1.14.4, 1.14, latest (the same for the variants slim and alpine) even if the OTP 25 is the default one for the elixir 1.14.

As far as I can see looking at the code, this will only require adding some aliases in generate-stackbrew-library.sh. I would be happy to make a PR for this, if my guess of the aliases is right.

SSL peer verification error for slim and alpine

Hello,

With slim and alpine variants, I can not install rebar (mix local.rebar --force)

I have

warning: failed to load system certificates. SSL peer verification will be skipped but downloads are still verified with a checksum

09:57:43.837 [error] Task #PID<0.109.0> started from #PID<0.99.0> terminating
** (MatchError) no match of right hand side value: {:error, :enoent}
    (public_key 1.14) pubkey_os_cacerts.erl:38: :pubkey_os_cacerts.get/0
    (inets 9.0) httpc.erl:476: :httpc.ssl_verify_host_options/1
    (inets 9.0) httpc.erl:1012: :httpc.http_options_default/0
    (inets 9.0) httpc.erl:927: :httpc.http_options/1
    (inets 9.0) httpc.erl:771: :httpc.handle_request/9
    (mix 1.15.0-rc.0) lib/mix/utils.ex:702: Mix.Utils.read_httpc/1
    (mix 1.15.0-rc.0) lib/mix/utils.ex:589: anonymous fn/2 in Mix.Utils.read_path/2
    (elixir 1.15.0-rc.0) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
Function: #Function<5.80278363/0 in Mix.Utils.read_path/2>
    Args: []
** (EXIT from #PID<0.99.0>) an exception was raised:
    ** (MatchError) no match of right hand side value: {:error, :enoent}
        (public_key 1.14) pubkey_os_cacerts.erl:38: :pubkey_os_cacerts.get/0
        (inets 9.0) httpc.erl:476: :httpc.ssl_verify_host_options/1
        (inets 9.0) httpc.erl:1012: :httpc.http_options_default/0
        (inets 9.0) httpc.erl:927: :httpc.http_options/1
        (inets 9.0) httpc.erl:771: :httpc.handle_request/9
        (mix 1.15.0-rc.0) lib/mix/utils.ex:702: Mix.Utils.read_httpc/1
        (mix 1.15.0-rc.0) lib/mix/utils.ex:589: anonymous fn/2 in Mix.Utils.read_path/2
        (elixir 1.15.0-rc.0) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2

I've detected that on the-benchmarker/web-frameworks#6389. Using default image solve the issue.

Regards,

Latest elixir:1.13.4 breaks SSL options for Postgrex.

When building images with elixir:1.13.4@sha256:ac98dada9d5ef97a519b0eda94fb2c68f3f9df7748bbdc3d833b4ed396a8cb5d there is a following error trying to start postgrex with SSL certificate:

2022-09-15T22:58:06.293 pid=<0.2837.0> [error] GenServer #PID<0.2837.0> terminating\n** (stop) exited in: :gen_statem.call(#PID<0.2844.0>, {:start, 15000}, :infinity)\n    ** (EXIT) an exception was raised:\n        ** (ArgumentError) errors were found at the given arguments:\n\n  * 1st argument: not a binary\n\n            :erlang.binary_to_list('..data/us-west-1-bundle.pem')\n            (ssl 10.7.3.4) ssl_config.erl:221: :ssl_config.file_error/2\n            (ssl 10.7.3.4) ssl_config.erl:53: :ssl_config.init/2\n            (ssl 10.7.3.4) ssl_gen_statem.erl:162: :ssl_gen_statem.ssl_config/3\n            (ssl 10.7.3.4) tls_connection.erl:151: :tls_connection.init/1\n            (stdlib 3.17.2.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3\n    (stdlib 3.17.2.1) gen.erl:220: :gen.do_call/4\n    (stdlib 3.17.2.1) gen_statem.erl:703: :gen_statem.call_dirty/4\n    (ssl 10.7.3.4) ssl_gen_statem.erl:1224: :ssl_gen_statem.call/2\n    (ssl 10.7.3.4) ssl_gen_statem.erl:232: :ssl_gen_statem.handshake/2\n    (ssl 10.7.3.4) ssl_gen_statem.erl:201: :ssl_gen_statem.connect/8\n    (postgrex 0.15.13) lib/postgrex/protocol.ex:738: Postgrex.Protocol.ssl_connect/2\n    (postgrex 0.15.13) lib/postgrex/protocol.ex:655: Postgrex.Protocol.handshake/2\n    (postgrex 0.15.13) lib/postgrex/protocol.ex:160: Postgrex.Protocol.connect_endpoints/6\nLast message: nil

While postgrex is configured with

config :my_app, MyApp.Repo,
  ssl_opts: [
    verify: :verify_peer,
    cacertfile: "/mnt/postgres/certificate/us-west-1-bundle.pem"
  ]

Building the same code with elixir:1.13.4@sha256:fd1b66f10b2c3d47095f9a400f932c5d30b6fe25624b53bc7a4c8909dcb7aa54 and with elixir:1.14.0 does not produce such error.

Alpine image has 5 second delay with net none

Slim

$ time docker run --rm elixir:slim elixir -e 'IO.puts "Hello, World!"'
Hello, World!

real	0m2.251s

Slim net none

$ time docker run --rm --net none elixir:slim elixir -e 'IO.puts "Hello, World!"'
Hello, World!

real	0m2.089s

Alpine

$ time docker run --rm elixir:alpine elixir -e 'IO.puts "Hello, World!"'
Hello, World!

real	0m2.191s

Alpine net none

$ time docker run --rm --net none elixir:alpine elixir -e 'IO.puts "Hello, World!"'
Hello, World!

real	0m7.004s

Naming convention for Elixir 1.13 built against Erlang 25 Docker images.

Erlang 1.13.4 supports both Erlang 24 and 25.

With the new Erlang 25 docker image released it would be great to also release an Elixir image that is based on it.
However, I assume you probably don't want to change the Erlang version out from underneath the current Elixir release.

Thus I assume there needs to be a naming convention for Elixir 1.13 based on an Erlang 25 Docker image...

I'm willing to start a PR but I need the naming convention you'd like to get it going.

Proposal: Windows container support

Related proposal in the Erlang image repo: erlang/docker-erlang-otp#360

We a dependency on Windows. It would be very convenient for us to have official Elixir Windows base images from which to build. Has this been considered already and would it be useful for others? As I have said on the Erlang sister issue, this is something we're going to be investigating in house and could wrap up into a PR if desired.

Pulling 1.14.5-otp25 gives you 1.14.4

$ docker run -it --rm elixir:1.14.5-otp-25
Unable to find image 'elixir:1.14.5-otp-25' locally
1.14.5-otp-25: Pulling from library/elixir
bd73737482dd: Already exists 
6710592d62aa: Already exists 
75256935197e: Already exists 
c1e5026c6457: Already exists 
879610ba8c86: Pull complete 
54dba5dd639b: Pull complete 
aaa14ccff95b: Pull complete 
cebabf28ecc2: Pull complete 
Digest: sha256:7daccf162a04a00d7766adc9695dfc6a4f17ce1bf6a3ae0e5bfd36032f52e51b
Status: Downloaded newer image for elixir:1.14.5-otp-25
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]

Interactive Elixir (1.14.4) - press Ctrl+C to exit (type h() ENTER for help)

At least one invalid signature was encountered

Hello! We are encountering an issue trying to use the Elixir image:

lev@host $ docker run --rm -ti elixir bash
root@975eb671163a:/# apt update
Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Err:1 http://deb.debian.org/debian buster InRelease
  At least one invalid signature was encountered.
Err:2 http://security.debian.org/debian-security buster/updates InRelease
  At least one invalid signature was encountered.
Err:3 http://deb.debian.org/debian buster-updates InRelease
  At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: http://deb.debian.org/debian buster InRelease: At least one invalid signature was encountered.
E: The repository 'http://deb.debian.org/debian buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://security.debian.org/debian-security buster/updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://security.debian.org/debian-security buster/updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://deb.debian.org/debian buster-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://deb.debian.org/debian buster-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@975eb671163a:/# 
$ docker image inspect elixir
[
    {
        "Id": "sha256:b4035e09be15b06e4d260833c3e6308a0cf06a6ab2f8393733e8a848b17f0391",
        "RepoTags": [
            "elixir:latest"
        ],
        "RepoDigests": [
            "elixir@sha256:d85edac121e0f0c0fa919cbfc7e5b1ff5043b3133e74addd87d0240734c67873"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2021-11-19T19:22:56.609470188Z",
        "Container": "a5c2b3c717d095140b050489e20f014e065d81cc5800dec6b30141b0f7302eec",
        "ContainerConfig": {
            "Hostname": "a5c2b3c717d0",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "OTP_VERSION=24.1.6",
                "REBAR3_VERSION=3.17.0",
                "REBAR_VERSION=2.6.4",
                "ELIXIR_VERSION=v1.12.3",
                "LANG=C.UTF-8"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "#(nop) ",
                "CMD [\"iex\"]"
            ],
            "Image": "sha256:6c7cfa146fa6ca2de9d57ed166a86e0dabe3bdd3df892132be71238003043a98",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "org.opencontainers.image.version": "24.1.6"
            }
        },
        "DockerVersion": "20.10.7",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "OTP_VERSION=24.1.6",
                "REBAR3_VERSION=3.17.0",
                "REBAR_VERSION=2.6.4",
                "ELIXIR_VERSION=v1.12.3",
                "LANG=C.UTF-8"
            ],
            "Cmd": [
                "iex"
            ],
            "Image": "sha256:6c7cfa146fa6ca2de9d57ed166a86e0dabe3bdd3df892132be71238003043a98",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "org.opencontainers.image.version": "24.1.6"
            }
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 1257731382,
        "VirtualSize": 1257731382,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/1120ba142538d4846797383b0e87bfefb07d396cd491ffbf3903fa777144d731/diff:/var/lib/docker/overlay2/7644552b3a0c7c965693f1295c4fb32878679933ba84ff3d9dde4742c09f68b5/diff:/var/lib/docker/overlay2/b5c5e2d0e0d5b59a55e000360372ed28c505cf5193f6a8a3a87d2aa8beaf9de6/diff:/var/lib/docker/overlay2/22c517c1941c75281a2316c366b94973a56f4f0ef0726d649cb770e91fe5d39d/diff:/var/lib/docker/overlay2/9cefbf6cf3183e4a5ccfb89a5132ce43f92f405f9d308ecd988fb4e2c29ba009/diff:/var/lib/docker/overlay2/9e5f3aaa2a8fc8d1959f9f5cb0515dd4e22dd3747dcaac1df5c0b3f4e6e43965/diff:/var/lib/docker/overlay2/5b90adc93613f615335e22906ffada27fc449c5b0de3b3484c46ee56487c003e/diff:/var/lib/docker/overlay2/a392187bf95c35bf743c42e56d73f70f6aadc563a96faf440ddfd77e78f964c8/diff",
                "MergedDir": "/var/lib/docker/overlay2/0a47ce60fa6285a0785c4646458af6aca0eced1ec16fb908f8e45aeca4a29925/merged",
                "UpperDir": "/var/lib/docker/overlay2/0a47ce60fa6285a0785c4646458af6aca0eced1ec16fb908f8e45aeca4a29925/diff",
                "WorkDir": "/var/lib/docker/overlay2/0a47ce60fa6285a0785c4646458af6aca0eced1ec16fb908f8e45aeca4a29925/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:040a44cff5e0b241b36b400b96a614b2fb9037e9e983dddcc8d437377a663601",
                "sha256:ee64586bec2217891a9b2ea7fbe14c6d87ed50ecb23510ae1dee710d02e9ee4d",
                "sha256:0ac0b7cace9576345d934e2b801d1ace3edda62e2ecbd9d46b23abfcecb50fb9",
                "sha256:a5e5ff41e5d3a9d1aa0ef08cff10b75cba540a48d20bead8b9dee155e6ddd6ff",
                "sha256:6cdb6a376c8bbee4eb865d85e6045462b6f70ec315d0a55e9fc5dfd0e8fd0b18",
                "sha256:d7cc5c57f5bdaba432326dd79e0e90945c5aa1e7379f90b9a27ffe8c0c12bdad",
                "sha256:ccc83cc0238028f2a75349c544d55534011be37eb16c272725de4b314c022891",
                "sha256:2d954635fd9e79289dc536bc319661607a834bfeb38b61e4387e780466a71172",
                "sha256:666dbf724e2d291ec84de6e0f3bc9dd941aaca1f96a2b04339806013248f0afd"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

Any ideas how to work around this?

1.13-alpine rebuilt 10 hours ago now getting errors

We have an issue where the following error in our containers:

Error relocating /app/erts-12.3.2.1/bin/beam.smp: _ZSt28__throw_bad_array_new_lengthv: symbol not found Error relocating /app/erts-12.3.2.1/bin/beam.smp: pthread_getname_np: symbol not found

We are building in a container created from image elixir:1.13-alpine and then running the artifact in a container created from image alpine:3.14. Up until yesterday this was working. When I check dockerhub the elixir:1.13-alpine image was rebuilt 10 hours ago.

I'm also seeing someone having similar issues here: https://stackoverflow.com/questions/72609505/issue-with-building-elixir-and-beam-on-alpine-linux

Is there anything we can do to address this?

docker-elixir / 1.13 / slim - fails TLS with Github SNI error

docker run -ti elixir:1.13.4-slim /usr/local/bin/elixir -e "{:unexpected_msg, {:internal, {:encrypted_extensions, %{sni: {:sni, []}}}}} != for {:ok,_} <- [Application.ensure_all_started(:inets)], do: for {:ok,_} <- [Application.ensure_all_started(:ssl)], do: :httpc.request('https://objects.githubusercontent.com:443')"
10:57:17.347 [warning] Description: 'Authenticity is not established by certificate path validation'
     Reason: 'Option {verify, verify_peer} and cacertfile/cacerts is missing'
10:57:17.473 [notice] TLS :client: In state :hello_middlebox_assert at ssl_gen_statem.erl:736 generated CLIENT ALERT: Fatal - Unexpected Message
 - {:unexpected_msg, {:internal, {:encrypted_extensions, %{sni: {:sni, []}}}}}

Docker images include Elixir source

The images should really only include the compiled Elixir modules, but currently all of the source code is there. This is how to verify that:

โžœ  ~ docker run -it elixir:1.11.3-alpine /bin/sh
/ # ls /usr/local/src/elixir/lib/elixir/lib/
access.ex              collectable.ex         gen_event.ex           list                   process.ex             string_io.ex
agent                  config                 gen_server.ex          list.ex                protocol.ex            supervisor
agent.ex               config.ex              hash_dict.ex           macro                  range.ex               supervisor.ex
application.ex         dict.ex                hash_set.ex            macro.ex               record                 system.ex
atom.ex                dynamic_supervisor.ex  inspect                map.ex                 record.ex              task
base.ex                enum.ex                inspect.ex             map_set.ex             regex.ex               task.ex
behaviour.ex           exception.ex           integer.ex             module                 registry.ex            tuple.ex
bitwise.ex             file                   io                     module.ex              set.ex                 uri.ex
calendar               file.ex                io.ex                  node.ex                stream                 version.ex
calendar.ex            float.ex               kernel                 option_parser.ex       stream.ex
code                   function.ex            kernel.ex              path.ex                string
code.ex                gen_event              keyword.ex             port.ex                string.ex

In the image definition the source should be removed, or ideally the image could be built using multi-stage builds. For the reference that's how the hexpm team does it.

docker build error for 1.10.4-alpine

elixir: 1.10.4
erlang: 22.0.7
docker image: 1.10.4-alpine

five days back docker image changed on dockerhub and getting below error during mix compilation.

make: *** [Makefile:36: lib/bcrypt_elixir/priv] Error 127
could not compile dependency :bcrypt_elixir, "mix compile" failed. You can recompile this dependency with "mix deps.compile bcrypt_elixir", update it with "mix deps.update bcrypt_elixir" or clean it with "mix deps.clean bcrypt_elixir"
** (Mix) Could not compile with "make" (exit status: 2).
You need to have gcc and make installed. If you are using
Ubuntu or any other Debian-based system, install the packages
"build-essential". Also install "erlang-dev" package if not
included in your Erlang/OTP version. If you're on Fedora, run
"dnf group install 'Development Tools'".

CA certs bundle error in 1.11.4-alpine

After upgrading to 1.11.4-alpine I started to get CA Unknown errors from Amazon CA root.

20:06:22.377 [warn] ExAws: HTTP ERROR: {:tls_alert, {:unknown_ca, 'TLS client: In state certify at ssl_handshake.erl:1887 generated CLIENT ALERT: Fatal - Unknown CA\n'}} for URL: "https://email.us-east-1.amazonaws.com/" ATTEMPT: 1

Getting load_failed,"Failed to load NIF library /app/lib/crypto-4.9.0.4/priv/lib/crypto in elixir-1.10.4-slim

I started getting error
[load_failed,"Failed to load NIF library /app/lib/crypto-4.6.5.4/priv/lib/crypto: 'libcrypto.so.1.1: cannot open shared object file: No such file or directory'","OpenSSL might not be installed on this system.\n"] Unable to load crypto library. Failed with error:~n\"~p, ~s\"~n~s"
in elixir-1.10.4-slim image from last week. It was working fine before that.
I am assuming the error comes from debian:buster image which was updated last week.

How to fix this

PROPOSAL: Add git to alpine image

I recently updated a dependency in a project to pull from a git repo. Mix deps.get failed to pull as git wasn't found in the image PATH.

I propose adding git to the alpine image to allow mix to compile git repositories.

Bundle any of: `sudo` (and `google-chome-stable`, `chromedriver`)

First, thank you so much for maintaining the elixir images โค๏ธ

Trying to install chromedriver turned out to be way more complicated than I was hoping for. I'm a n00b, so it took help and a few hours of my time.

The formula I was using required sudo (not installed), and google-chrome, also not installed.

I'm a n00b in these kinds of things, but please consider bundling at leastsudo (for standard and alpine) and ideally google-chome-stable and chromedriver (maybe just for alpine?)

This is using the non-slim version. My quest was even more complicated because it took a while to realize I was using the -slim version, so was also missing wget, curl, unzip, gnupg. Some documentation about the slim vs alpine vs "standard" version would be welcome.

Let me know if (and how) I can help.

FWIW, here's what I ended up using in my github action:

    - name: Install Chrome
      run: |
        wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
        sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
        apt-get update && apt-get install -y sudo google-chrome-stable
    - name: Install chromedriver
      uses: nanasess/setup-chromedriver@master

v1.12.2 on mac M1 chip doesn't build

I'm trying to build docker image using elixir 1.12.2 from here.

Because it's M1 and I'm trying to compose linux amd64 I have to use
docker buildx build --platform linux/amd64 -t test . for building.

Because buildx uses qemu I get this error:

Screenshot 2021-08-16 at 11 22 16

I've tried different ELIXIR_DOWNLOAD_SHA256 hashes from here but none of them seems to work.

elixir 1.14 images segfault when running under qemu "Segmentation fault (core dumped)"

We use docker buildx to generate linux/arm64 builds over at wasmcloud and have been using the official elixir images for a while.

Today, we discovered our version upgrade (elixir 1.13 -> 1.14) left us using images that seem broken when running on x86_64 under qemu:

# information about my machine/environment
[pgray@ls ~]$ uname -m
x86_64
[pgray@ls ~]$ export DOCKER_DEFAULT_PLATFORM=linux/arm64

debian-slim:

[pgray@ls ~]$ docker run -it --rm --entrypoint bash elixir:1.13-slim
root@881af09409ab:/# mix --version
Erlang/OTP 24 [erts-12.3.2.7] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1]

Mix 1.13.4 (compiled with Erlang/OTP 24)
root@881af09409ab:/# 
exit

[pgray@ls ~]$ docker run -it --rm --entrypoint bash elixir:1.14-slim
root@776e8f141cf5:/# mix --version
Segmentation fault (core dumped)
root@776e8f141cf5:/# 
exit

alpine:

[pgray@ls ~]$ docker run -it --rm --entrypoint sh elixir:1.13-alpine
/ # mix --version
Erlang/OTP 24 [erts-12.3.2.7] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1]

Mix 1.13.4 (compiled with Erlang/OTP 24)
/ # 

[pgray@ls ~]$ docker run -it --rm --entrypoint sh elixir:1.14-alpine
/ # mix --version
Segmentation fault (core dumped)```

I pulled down `hexpm/elixir:1.14.2-erlang-24.3.4.9-debian-bullseye-20230202-slim` to compare and it works without issue.

Unable to pull elixir:1.16.2-slim due to no matching manifest for linux/amd64

I'm running a standard Intel 64-bit CPU and have run a bunch of Elixir versions in the past.

But here's what happens when trying to pull 1.16.2-slim:

$ docker pull elixir:1.16.2-slim
1.16.2-slim: Pulling from library/elixir
no matching manifest for linux/amd64 in the manifest list entries

It looks like this version is missing a bunch of standard CPU architectures:

image

1.16.1-slim and earlier works fine because they are built with more CPU architectures:

image

1.12 Alpine Builds Missing Symbols

FROM elixir:1.12.1-alpine as builder

WORKDIR /home/builder/build
RUN apk add git
ENV MIX_ENV=prod
RUN mix local.hex --force
RUN mix local.rebar --force
COPY mix.exs mix.lock ./
RUN mix deps.get
RUN mix compile
ADD . .
RUN mix release

FROM alpine:3.13
WORKDIR /var/www/app
COPY --from=builder /home/builder/build/_build/prod/ ./
EXPOSE 4000
ENTRYPOINT [ "/var/www/app/rel/measure_library/bin/app", "start" ]

Errors:

Error loading shared library libstdc++.so.6: No such file or directory (needed by /var/www/app/rel/app/erts-12.0.2/bin/beam.smp)
Error loading shared library libgcc_s.so.1: No such file or directory (needed by /var/www/app/rel/app/erts-12.0.2/bin/beam.smp)
Error relocating /var/www/app/rel/measure_library/erts-12.0.2/bin/beam.smp: __cxa_begin_catch: symbol not found
Error relocating /var/www/app/rel/measure_library/erts-12.0.2/bin/beam.smp: _ZSt24__throw_out_of_range_fmtPKcz: symbol not found
Error relocating /var/www/app/rel/measure_library/erts-12.0.2/bin/beam.smp: _Znwm: symbol not found
Error relocating /var/www/app/rel/measure_library/erts-12.0.2/bin/beam.smp: _ZSt20__throw_length_errorPKc: symbol not found
Error relocating /var/www/app/rel/measure_library/erts-12.0.2/bin/beam.smp: __cxa_guard_release: symbol not found

If I change the tag back to elixir:1.11-alpine everything is fine.

Docs Proposal: Add link to hexpm images and community support wiki

I think it would be useful to:

  1. Add get-help.md containing a link to the elixir wiki, which lists more relevant support options than the current readme.
  2. Add a link to the hexpm images produced automatically by the Hex team, because many people seeing the "official" image may not be aware there of this popular alternative that is accepted by the community with a similar level of officialness.

I have prepared a draft PR (to my fork for now): adamu/docker-docs#1 that I can submit to docker-library/docs, however as I am not a member of the EEF I do not want to do it unilaterally. If you are happy for me to make these changes I will submit the PR, or I'm happy to respond here or on the draft PR for feedback/suggestions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.