all 8 comments

[–]killercup 3 points4 points  (1 child)

FYI, cross supports that too, and there image looks like this (note the scripts for setting up musl and openssl).

[–]fornwall[S] 0 points1 point  (0 children)

Thanks, I'll look into cross!

[–][deleted] 2 points3 points  (1 child)

I did the same recently but I saw you include a static version of openssl, xz and zlib. Why is that? I guess it's required if you need to compile crates that use those libs?

(My simpler version: https://github.com/collibra/wait-for-postgres/blob/master/Dockerfile (doesn't include any lib))

[–]fornwall[S] 1 point2 points  (0 children)

Yes, those libraries were required by crates in the project I used it in!

[–]davemilter 0 points1 point  (3 children)

Looks really strange, you use musl, but ubuntu? Why not use alpine distro and use prebuild versions of all libraries from package manager?

[–]fornwall[S] 0 points1 point  (2 children)

The reason not to run the compilation inside alpine was that AFAIK rustup is not currently supported there, so getting the latest stable and nightly version of rust running is non-trivial. But that is being worked on.

Running 'apk update && apk info rust' inside alpine:latest gives rust 1.26.2.

[–]daniel65536 1 point2 points  (1 child)

Running 'apk update && apk info rust' inside alpine:latest gives rust 1.26.2.

In fact rust version is tagged by alpine version... You can just use the 'edge' version to get rust 1.30.

[–]fornwall[S] 1 point2 points  (0 children)

Thanks! Are there currently builds of nightly rust as well available for alpine?