An Alpine Linux build with LDC and Dub for Dlang
1.1K
A compilation for D code using LDC running on Alpine Linux. Perfect for multi-stage docker builds or playing with light environments. Dub is also included in this container.
This is a pretty regular docker build. The appropriate LDC version and the latest version of Dub that the dub-registry knows about will be pulled down during the container build process.
Optionally, a build argument can be supplied to set the version of LDC to pull. The default is v1.9.0.
Example:
export LDC_VERSION=1.9.0
docker build --build-arg "LDC_VERSION=${LDC_VERSION}" -t "alpine-ldc:${LDC_VERSION}" .
# or
make LDC=1.9.0
Once the docker container is built or pulled, running it is easy.
$ docker run -it --rm alpine-ldc:1.9.0
/ # cd /tmp
/tmp # echo 'void main() { import std.stdio; writeln("hello, world!"); } ' > test.d
/tmp # ldc2 test.d -of test
/tmp # /tmp/test
hello, world!
/tmp # exit
Examples require that you have docker installed on your machine. This is the simplest example.
dub init prompt doesn't quite work.Content type
Image
Digest
Size
94.9 MB
Last updated
over 8 years ago
docker pull andrewbenton/alpine-ldc