Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Alpine Linux #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add Alpine Linux #18

wants to merge 1 commit into from

Conversation

tom-tan
Copy link

@tom-tan tom-tan commented Nov 1, 2020

This request fixes #2.

It build alpine images for dmd, ldc, and gdc.
It does nothing for non-stable versions (e.g., dmd-beta, ldc-beta).

I confirmed that the following commands work in the resulted images as intended.

For dmd:

$ dmd sample.d; ./sample
$ rdmd --compiler=dmd sample.d
$ dub init foo; cd foo; dub run # Note: initialize the directory with default options

For ldc:

$ ldc2 sample.d; ./sample
$ ldc2 sample.d -static; ./sample # for static linked binary
$ rdmd sample.d
$ dub init foo; cd foo; dub run

For gdc:

$ gdc sample.d -o sample; ./sample
$ gdc sample.d -o sample -static; ./sample # for static linked binary
$ rdmd --compiler=gdmd sample.d # Note: it prints annoying log messages but solving it is out of scope of this request
$ dub init foo; cd foo; dub run

sample.d (used in the above examples):

import std.stdio;

void main()
{
    writeln("hello");
}

Note:
It uses the official packages provided by Alpine Linux instead of using packages by dlang.org as used in other Linux distributions.
Therefore it cannot use D_VERSION_RESOLVED because Alpine Linux has different release cycles for D compilers.
Instead of that, it introduces D_VERSION_RESOLVED_ALPINE that specifies the latest official package version without package revision number (See "show_resolved_version.sh" for details).

@tom-tan
Copy link
Author

tom-tan commented Nov 10, 2020

Ping!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alpine/Muslim image
1 participant