Re: German D tutorial: Sichere Docker images für cloud Anwendungen erstellen
On Wednesday, 3 June 2020 at 11:16:15 UTC, WebFreak001 wrote: On Friday, 29 May 2020 at 15:49:31 UTC, Andre Pany wrote: Hi, This tutorial describes how to run a vibe-d http server within a docker scratch image for the purpose of security. https://d-land.sepany.de/tutorials/cloud/sichere-docker-images-fuer-cloud-anwendungen-erstellen/ Kind regards Andre Sehr schick. Jetzt wo Alpine auch D unterstützt, ist es schon möglich das ganze auch über Docker zu verwenden? (anstatt ubuntu:focal als base) Ich würde denken dass das die erste Build Zeit verbessern wird weil weniger Dependencies geladen werden. Bin mir jetzt aber nicht sicher ob das danach immer noch einen Vorteil bietet. Linken die Alpine D compiler mit musl C? Könnte ja sein dass das ganze Image dadurch sogar noch kleiner wird. Ich habe Alpine ausprobiert, und werde das Tutorial noch erweitern. Die build Zeit ist gefühlt genau so lang, oder noch ein bisschen länger. Die Grösse vom Final Image ändert sich auch kaum (15 Mb vs 16 Mb, mit `-b release` Argument). Die Grösse vom final Image lässt sich noch reduzieren wenn man die static libraries von druntime/phobos nimmt. Per default werden die SO Dateien eingebunden. Das macht auch noch ein paar MB aus. Viele Grüße Andre
Re: German D tutorial: Sichere Docker images für cloud Anwendungen erstellen
On Friday, 29 May 2020 at 15:49:31 UTC, Andre Pany wrote: Hi, This tutorial describes how to run a vibe-d http server within a docker scratch image for the purpose of security. https://d-land.sepany.de/tutorials/cloud/sichere-docker-images-fuer-cloud-anwendungen-erstellen/ Kind regards Andre Sehr schick. Jetzt wo Alpine auch D unterstützt, ist es schon möglich das ganze auch über Docker zu verwenden? (anstatt ubuntu:focal als base) Ich würde denken dass das die erste Build Zeit verbessern wird weil weniger Dependencies geladen werden. Bin mir jetzt aber nicht sicher ob das danach immer noch einen Vorteil bietet. Linken die Alpine D compiler mit musl C? Könnte ja sein dass das ganze Image dadurch sogar noch kleiner wird.
Re: German D tutorial: Sichere Docker images für cloud Anwendungen erstellen
On Tuesday, 2 June 2020 at 06:47:55 UTC, Jan Hönig wrote: On Friday, 29 May 2020 at 15:49:31 UTC, Andre Pany wrote: Hi, This tutorial describes how to run a vibe-d http server within a docker scratch image for the purpose of security. https://d-land.sepany.de/tutorials/cloud/sichere-docker-images-fuer-cloud-anwendungen-erstellen/ Kind regards Andre Sehr gute Anleitung. Danke dafür. Ich kannte deinen Blog noch gar nicht. Danke :) Viele Grüße Andre
Re: German D tutorial: Sichere Docker images für cloud Anwendungen erstellen
On Friday, 29 May 2020 at 15:49:31 UTC, Andre Pany wrote: Hi, This tutorial describes how to run a vibe-d http server within a docker scratch image for the purpose of security. https://d-land.sepany.de/tutorials/cloud/sichere-docker-images-fuer-cloud-anwendungen-erstellen/ Kind regards Andre Sehr gute Anleitung. Danke dafür. Ich kannte deinen Blog noch gar nicht.
German D tutorial: Sichere Docker images für cloud Anwendungen erstellen
Hi, This tutorial describes how to run a vibe-d http server within a docker scratch image for the purpose of security. https://d-land.sepany.de/tutorials/cloud/sichere-docker-images-fuer-cloud-anwendungen-erstellen/ Kind regards Andre
Re: docker images
On Thursday, 28 June 2018 at 17:54:45 UTC, Radu wrote: Created a couple of docker images useful for dlang dev. LDC cross compiler for ARM - https://hub.docker.com/r/rracariu/ldc-linux-armhf/ This image allows one to easily cross compile to ARM. Main use-case is continuous integration servers. - https://hub.docker.com/r/rracariu/dub-registry/ Allows easily running a private dub repository on cloud. We now setup auto-deploy to DockerHub from the official dlang/dub-registry: https://github.com/dlang/dub-registry/pull/354 https://hub.docker.com/r/dlangcommunity/dub-registry/tags So your private Dub registry docker instance should be able to update itself automatically.
Re: docker images
On Friday, 29 June 2018 at 06:13:53 UTC, Anton Fediushin wrote: On Friday, 29 June 2018 at 04:51:49 UTC, Joakim wrote: On Thursday, 28 June 2018 at 17:54:45 UTC, Radu wrote: [...] Note that there is also an Alpine container with LDC, should be useful for building D microservices: https://hub.docker.com/r/andrewbenton/alpine-ldc/ It would be so nice if I knew about this image earlier. I ended up making my own minimal image for LDC with OpenSSL 1.1 and goinsu for privilege lowering. https://hub.docker.com/r/ohboi/minildc/ It's 153MiB, which is just 53MiB bigger than alpine-based image. I think I did a pretty good job there, most importantly there aren't any problems with musl libc, since it's based on debian-slim. Yet still I don't really use this image - LDC has some problems compiling my vibe.d applications. For every CI build I use my other image: https://hub.docker.com/r/ohboi/minidmd/ Which is the same thing, but with DMD instead. It's even smaller, only 91MiB. Try out the Alpine image and see if it doesn't have the same issue with vibe-d. Also, if you report your problem with ldc here, preferably with a reduced sample, someone will take a look: https://github.com/ldc-developers/ldc/issues
Re: docker images
On Friday, 29 June 2018 at 04:51:49 UTC, Joakim wrote: On Thursday, 28 June 2018 at 17:54:45 UTC, Radu wrote: Created a couple of docker images useful for dlang dev. LDC cross compiler for ARM - https://hub.docker.com/r/rracariu/ldc-linux-armhf/ This image allows one to easily cross compile to ARM. Main use-case is continuous integration servers. - https://hub.docker.com/r/rracariu/dub-registry/ Allows easily running a private dub repository on cloud. Note that there is also an Alpine container with LDC, should be useful for building D microservices: https://hub.docker.com/r/andrewbenton/alpine-ldc/ It would be so nice if I knew about this image earlier. I ended up making my own minimal image for LDC with OpenSSL 1.1 and goinsu for privilege lowering. https://hub.docker.com/r/ohboi/minildc/ It's 153MiB, which is just 53MiB bigger than alpine-based image. I think I did a pretty good job there, most importantly there aren't any problems with musl libc, since it's based on debian-slim. Yet still I don't really use this image - LDC has some problems compiling my vibe.d applications. For every CI build I use my other image: https://hub.docker.com/r/ohboi/minidmd/ Which is the same thing, but with DMD instead. It's even smaller, only 91MiB.
Re: docker images
On Thursday, 28 June 2018 at 17:54:45 UTC, Radu wrote: Created a couple of docker images useful for dlang dev. LDC cross compiler for ARM - https://hub.docker.com/r/rracariu/ldc-linux-armhf/ This image allows one to easily cross compile to ARM. Main use-case is continuous integration servers. - https://hub.docker.com/r/rracariu/dub-registry/ Allows easily running a private dub repository on cloud. Note that there is also an Alpine container with LDC, should be useful for building D microservices: https://hub.docker.com/r/andrewbenton/alpine-ldc/
docker images
Created a couple of docker images useful for dlang dev. LDC cross compiler for ARM - https://hub.docker.com/r/rracariu/ldc-linux-armhf/ This image allows one to easily cross compile to ARM. Main use-case is continuous integration servers. - https://hub.docker.com/r/rracariu/dub-registry/ Allows easily running a private dub repository on cloud.
Re: DLang docker images for CircleCi 2.0
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
Re: DLang docker images for CircleCi 2.0
On Saturday, 6 January 2018 at 05:02:48 UTC, Jon Degenhardt 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 [snip PS: I'm aware of Stefan Rohe's great D Docker images [1], but this Docker image is built on top of the specialized CircleCi image (e.g. for their SSH login). One useful characteristic of Stefan's images is that the Dockerhub pages include the Dockerfile and github repository links. I don't know what it takes to include them. It does make it easier to see exactly what the configuration is, find the repo, and even create PRs against them. Would be useful if they can be added to the CircleCI image pages. Oh, thanks for the hint! I added a link back to the repo: https://github.com/wilzbach/dlang-docker (FYI: the link was in my post) My interest in this case - I use Stefan's LDC image in Travis-CI builds. Building the runtime libraries with LTO/PGO requires the ldc-build-runtime tool, which in turn requires a few additional things in the docker image, like cmake or ninja. I was interested if they might have been included in the CircleCI images as well. (Doesn't appear so.) Nope, it's not. Here's the list of the packages pre-installed: https://github.com/wilzbach/dlang-docker/blob/master/circleci/dlang.docker However, CircleCi gives you sudo rights by default and can simply add: sudo apt-get update && sudo apt-get install cmake Note that the CircleCi Docker image was motivated to test PIE-hardening with DMD, but it's still WIP: https://github.com/dlang/dmd/pull/7579
Re: DLang docker images for CircleCi 2.0
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 [snip PS: I'm aware of Stefan Rohe's great D Docker images [1], but this Docker image is built on top of the specialized CircleCi image (e.g. for their SSH login). One useful characteristic of Stefan's images is that the Dockerhub pages include the Dockerfile and github repository links. I don't know what it takes to include them. It does make it easier to see exactly what the configuration is, find the repo, and even create PRs against them. Would be useful if they can be added to the CircleCI image pages. My interest in this case - I use Stefan's LDC image in Travis-CI builds. Building the runtime libraries with LTO/PGO requires the ldc-build-runtime tool, which in turn requires a few additional things in the docker image, like cmake or ninja. I was interested if they might have been included in the CircleCI images as well. (Doesn't appear so.)
Re: DLang docker images for CircleCi 2.0
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?
DLang docker images for CircleCi 2.0
tl;dr: you can now use special D docker images for CircleCi 2.0 --- version: 2 jobs: build: docker: - image: dlang2/dmd-circleci --- Available tags -- The default tag (`latest`) is the last stable release. ### DMD ```yaml - image: dlang2/dmd-circleci:nightly - image: dlang2/dmd-circleci:beta - image: dlang2/dmd-circleci - image: dlang2/dmd-circleci:2.078.0 ``` ### LDC ```yaml - image: dlang2/ldc-circleci:beta - image: dlang2/ldc-circleci - image: dlang2/ldc-circleci:1.6.0 ``` ### GDC ```yaml - image: dlang2/gdc-circleci - image: dlang2/gdc-circleci:4.8.5 ``` Full list: - https://hub.docker.com/r/dlang2/dmd-circleci/tags/ - https://hub.docker.com/r/dlang2/ldc-circleci/tags/ - https://hub.docker.com/r/dlang2/gdc-circleci/tags/ This repo is fully automated and new releases get deployed automatically. It already has DMD 2.078.0. Repo: https://github.com/wilzbach/dlang-docker-circleci Cheers, Seb PS: I'm aware of Stefan Rohe's great D Docker images [1], but this Docker image is built on top of the specialized CircleCi image (e.g. for their SSH login). [1] https://github.com/lindt/docker-dmd