Public Repository

Last pushed: 2 years ago
Short Description
Docker images for GDC
Full Description

Supported tags and respective Dockerfile links

Development tags and respective Dockerfile links

Avaliable D2 Versions.

  • 4.7-v2.063
  • 4.8-v2.065, 4.9-v2.065
  • 4.8-v2.066, 4.9-v2.066

How to use this image

Start a GDC instance running your app

The most straightforward way to use this image is to use a gdc container as both the build and runtime environment. In your Dockerfile, writing something along the lines of the following will compile and run your project:

FROM ibuclaw/gdc:4.9
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
RUN gdc -o myapp main.d
CMD ["./myapp"]

Then, build and run the Docker image:

docker build -t my-gdc-app .
docker run -it --rm --name my-running-app my-gdc-app

Compile your app inside the Docker container

There may be occasions where it is not appropriate to run your app inside a container. To compile, but not run your app inside the Docker instance, you can write something like:

docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp ibuclaw/gdc:4.9 \
    gdc -o myapp myapp.d

This will add your current directory, as a volume, to the container, set the working directory to the volume, and run the command gdc -o myapp myapp.d. This tells gdc to compile the code in myapp.d and output the executable to myapp. Alternatively, if you have a Makefile, you can instead run the make command inside your container:

docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp ibuclaw/gdc:4.9 make
Docker Pull Command
Owner
ibuclaw

Comments (0)