Sign inSign up

vreitech/docker-ldc

By vreitech

•Updated about 1 month ago

Docker image for LLVM-based D compiler

Image
Languages & frameworks
0

10K+

vreitech/docker-ldc repository overview

Docker Image CI publish GHCR Latest Tag GHCR Images Size

⁠About this fork

This repository forked out of https://github.com/ctrecordings/docker-ldc⁠ and https://github.com/lindt/docker-ldc⁠ repos.

Relevant contributors listed at:

⁠docker-ldc

Docker image for LLVM-based⁠ D⁠ compiler (also known as LDC2 or LDC).

⁠Motivation

Installation of a compiler sometimes is cumbersome. This Docker image should take this pain and allow you to easily switch between a versions of the compiler.

In case a native installation is required, curl -fsS https://dlang.org/install.sh | bash -s ldc could be used. You may also visit LLVM-based compiler Releases page⁠ on GitHub.

Docker image allows to use LDC compiler and dub package manager⁠ without installation.

⁠Includes (latest version)

  • Debian 12 (bookworm) environment
  • ldc2 compiler v1.40.0
  • ld.gold linker
  • ld.bfd linker
  • dub package manager
  • libxml2 library
  • libz (zlib)
  • libssl library

⁠Epochs

Epoch 1 images naming starts with v prefix. It's kind of "legacy" images which based on master branch at the moment of LDC2 verions release, and keeps unchanged (except for bugfixes).

Epoch 2 images naming starts with 2-v prefix. Epoch 2 images based on master branch from 19.05.2024, and contains all changes did in master branch till the date, including using setpriv instead of gosu, and aarch64 architecture support in addition to x86_64 (except for 2-v1.33.0 image).

⁠Usage

Place a test.d (for example with the contents of import std.stdio; void main() { writeln("It works!"); }) in your current directory. Then execute

docker run --rm -it -v "$(pwd):/src" docker.io/vreitech/docker-ldc:latest ldc2 test.d

or

docker run --rm -it -v "$(pwd):/src" ghcr.io/vreitech/docker-ldc:latest ldc2 test.d

Tag summary

Content type

Image

Digest

sha256:2f71b099e…

Size

223.1 MB

Last updated

about 1 month ago

docker pull vreitech/docker-ldc