Thread overview
vibe.d server in a docker image
Mar 07, 2018
Tamas
Mar 07, 2018
aberba
Mar 07, 2018
Tamas
March 07, 2018
I packaged a hello world vibe.d http server into a docker image. It's only 12 MB, and boots up real fast. I can run this on my ARM based NAS, pretty sweet.

    docker run -it --publish 8888:8888 tam4s/hello-vibe-x86_64

or

    docker run -it --publish 8888:8888 tam4s/hello-vibe-armv7l


source with build instruction: http://github.com/tam4s/hello-vibe
March 07, 2018
On Wednesday, 7 March 2018 at 12:41:59 UTC, Tamas wrote:
> I packaged a hello world vibe.d http server into a docker image. It's only 12 MB, and boots up real fast. I can run this on my ARM based NAS, pretty sweet.
>
>     docker run -it --publish 8888:8888 tam4s/hello-vibe-x86_64
>
> or
>
>     docker run -it --publish 8888:8888 tam4s/hello-vibe-armv7l
>
>
> source with build instruction: http://github.com/tam4s/hello-vibe

I notice from the Dockerfile you build and copy the binary to alpine directly. Why don't you build and serve from alpine directly?
March 07, 2018
On Wednesday, 7 March 2018 at 14:54:22 UTC, aberba wrote:
> I notice from the Dockerfile you build and copy the binary to alpine directly. Why don't you build and serve from alpine directly?

This way the final images won't contain the build environment, thus they are really small: 9 and 12 MB on arm and x86 respectively.