On Thursday, 4 January 2018 at 12:18:13 UTC, aberba wrote:
On Wednesday, 3 January 2018 at 13:12:48 UTC, Seb wrote:
tl;dr: you can now use special D docker images for CircleCi 2.0

---
version: 2
jobs:
  build:
    docker:
      - image: dlang2/dmd-circleci
---

[...]

do you orchestrate your containers in deployment?

Oh I am not sure we are talking about the same thing. This CircleCi image is intended to be used for CircleCi _only_ and there's a lot of stuff you probably don't want to have in your production container:

https://github.com/wilzbach/dlang-docker/blob/master/circleci/template.docker

However, I also added dlang2/{dmd,ldc,gdc}-ubuntu images recently. Here's an example app built with DUB:

https://github.com/wilzbach/dlang-docker/blob/master/example-app/Dockerfile

However, note that this will install the respective D compiler in your image which typically actually don't need for your application (so again it's more intended for CI usage) Hence, for my things I use `-static` and just COPY the binary into the docker image. Here's an example of an Open-Source application, which I maintain, that does so:

https://github.com/dlang-tour/core/blob/master/Dockerfile
https://github.com/dlang-tour/core/blob/master/dub.sdl

It's a pity that D doesn't support Musl (a light-weight alternative to glibc) yet, but that might change soon [1].
Anyhow for now you can use glibc on alpine, e.g.:

https://github.com/wilzbach/dlang-docker/blob/master/alpine/dlang.docker

[1] https://github.com/dlang/druntime/pull/1997

Reply via email to