https://github.com/vlang/docker
https://github.com/vlang/docker
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/vlang/docker
- Owner: vlang
- License: mit
- Created: 2020-08-12T18:47:11.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-17T20:19:31.000Z (over 2 years ago)
- Last Synced: 2025-01-16T07:27:43.015Z (over 1 year ago)
- Language: Dockerfile
- Size: 42 KB
- Stars: 28
- Watchers: 26
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://hub.docker.com/r/thevlang/vlang)
[](https://hub.docker.com/r/thevlang/vlang/tags?page=1&ordering=last_updated)
# 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
- [x] 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](https://docs.docker.com/engine/install/ubuntu/) but there are instructions for other distributions too.
## 2 Running the image
### Choose your image
Browse [thevlang/vlang](https://hub.docker.com/r/thevlang/vlang/tags?page=1&ordering=last_updated) on Docker Hub and choose your tag.
### Running the standard image
Running the development image using iteractive terminal.
```bash
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.
```bash
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.
```yml
version: "3"
services:
v:
image: thevlang/vlang:alpine
tty: true # Keeps your container running
volumes:
- .:/home/v
working_dir: /home/v
```
Use it:
```bash
you@pc > docker-compose exec v sh
$ v --version
V 0.2.2 f4486d7
```
Creating a disposable container.
```yml
version: "3"
services:
v:
image: thevlang/vlang:alpine
entrypoint: v
volumes:
- .:/home/v
working_dir: /home/v
```
Use it:
```bash
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.|