(Go: >> BACK << -|- >> HOME <<)

Skip to content

A Docker image with the V language compiler for building within Docker.

License

Notifications You must be signed in to change notification settings

prantlf/docker-vlang

Repository files navigation

VLang Docker Image

A Docker image with the V language compiler for building within Docker.

The GitHub workflow produces images ghcr.io/prantlf/vlang and prantlf/vlang (on hub.docker.com) from the latest release of V. It is scheduled to run at least every week to follow weekly releases of V. The image will be tagged by the V release name, latest and the image produced the last time will be tagged by previous. For example, how to access the image by name and the latest one:

ghcr.io/prantlf/vlang:weekly.2024.19
ghcr.io/prantlf/vlang:latest

prantlf/vlang:weekly.2024.19
prantlf/vlang:latest

Synopsis

FROM prantlf/vlang as builder

COPY . .
RUN v install && v .

FROM busybox:stable

COPY --from=builder /src/tool /

WORKDIR /
ENTRYPOINT ["/tool"]

The default working directory is /src. The V compiler is /opt/vlang/v and /opt/vlang is in PATH.

The image busybox:stable is a little bigger than scratch, but it's convenient, when the image hes to be entered for some investigation. If your program links to other libraries than glibc, you'll ned to add them the target image. Or use the image debian:stable-slim as the base image, if the image size isn't critical.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Lint and test your code.

License

Copyright (C) 2024 Ferdinand Prantl

Licensed under the MIT License.