lindt / docker-dmd

Docker Image for DMD
https://hub.docker.com/r/dlanguage/dmd/
MIT License
22 stars 6 forks source link

Create alpine images #1

Open SerialVelocity opened 7 years ago

SerialVelocity commented 7 years ago

Hey,

Love your images! Is it possible to use alpine or publish alpine images too?

Best, SerialVelocity

SerialVelocity commented 7 years ago

(this probably also would be good for ldc, etc)

wilzbach commented 6 years ago

Musl (the alternative glibc replaced used by Alpine) hasn't been supported by DRuntime. However, recent work is closing this gap and compiling DRuntime with Musl will be possible soon (see https://github.com/dlang/druntime/pull/2071).

SerialVelocity commented 6 years ago

This may also be possible by using https://hub.docker.com/r/frolvlad/alpine-glibc/ or https://github.com/sgerrand/alpine-pkg-glibc

wilzbach commented 6 years ago

1) It doesn't work (at least when I tried it half a year ago) 2) Using the bulky glibc kills the entire point of using alpine in the first place ;-)

SerialVelocity commented 6 years ago
  1. Ah, that's a shame. There are hacky things in that image to make it work from what I remember.
  2. It doesn't really make a bulky image. It's 5MB instead of 43MB 😄 (for some reason I thought Ubuntu was in the 100s of MB though)
joakim-noah commented 6 years ago

This should be possible now, with the ldc 1.8 release. There's an Alpine/x64 build up there, and I've updated the changelog with exactly which Alpine packages I needed to use it. Post in the microservices thread in the General forum to publicize any images you make available.

andrewbenton commented 6 years ago

I built out an LDC on alpine using that build andrewbenton/alpine-ldc, but it still has the aforementioned issues with musl and druntime until that's patched up. An interesting approach that's worked tam4s/hello-vibe involves building a static binary with ubuntu and then loading it onto alpine.