www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - vibe.d server in a docker image

reply Tamas <user dlang.io> writes:
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
Mar 07 2018
parent reply aberba <karabutaworld gmail.com> writes:
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?
Mar 07 2018
parent Tamas <user dlang.io> writes:
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.
Mar 07 2018