/docker

Primary LanguageDockerfileMIT LicenseMIT

GitHub Workflow Status Docker Pulls Docker Image Size (latest by date)

V programming language docker images source (Work in progress)

The docker files for the V programming language. Please check individual Dockerfile for what is provided in detail

Works both with docker for linux and windows on x86 plattform.

WIP

  • Basic images
  • Get nightly builds working
  • Provide examples of usage (vweb @smartiniOnGitHub example)

Structure

folder Description
base/os Docker files for supported os. Minimal dependencies
vlang Docker files for thevlang/vlang images

Structure of the image

The images are deployed as thevlang/vlang:tag.

Usage

1. Installing docker

Here are installation instructions on ubuntu but there are instructions for other distributions too.

2 Running the image

Choose your image

Browse thevlang/vlang on Docker Hub and choose your tag.

Running the standard image

Running the development image using iteractive terminal.

docker run \
  -it \
  --name v-container \
  thevlang/vlang \
  /bin/bash

Running the development image

Running the development image using iteractive terminal and mapping current directory to internal /src directory.

docker run \
  -it \
  -v ${PWD}:/src \
  --name v-dev-container \
  thevlang/vlang:alpine-dev \
  /bin/sh

Using Docker Compose

Creating a container ready to go in.

version: "3"
services:
  v:
    image: thevlang/vlang:alpine
    tty: true # Keeps your container running
    volumes:
      - .:/home/v
    working_dir: /home/v

Use it:

you@pc > docker-compose exec v sh
$ v --version
V 0.2.2 f4486d7

Creating a disposable container.

version: "3"
services:
  v:
    image: thevlang/vlang:alpine
    entrypoint: v
    volumes:
      - .:/home/v
    working_dir: /home/v

Use it:

you@pc > docker-compose run v --version
V 0.2.2 f4486d7

Different images being built

Following images are built from this repo:

tag Description
latest Nightly build of latest V on Debian Buster
[githash] The sha commit id built (soon supported)
buster Nightly build of latest V on Debian Buster
alpine Nightly build of latest V on Alpine 3.11
ubuntu Nightly build of latest V on Ubuntu 20.04
runtime-scratch Minimal size scratch based image with runtime dependencies (soon supported)
[dist]-build Used in V CI builds to build V itself. No V included in image.
[dist]-dev Development build with all development dependecies on distributions.