LiteIDE containerized: A fast reproducible Go development environment
3.0K
A LiteIDE redistribution as Docker container image providing a fast, portable, reproducible Go development environment.
This image can be run using the launcher script liteide.sh or using
Docker directly.
Install the launcher script on your host:
curl -fsSL https://raw.githubusercontent.com/mgoltzsche/liteide-docker/master/liteide.sh -o /tmp/run-liteide &&
chmod +x /tmp/run-liteide &&
sudo mv /tmp/run-liteide /usr/local/bin/run-liteide
The launcher can be used as follows:
run-liteide PROJECTDIR [PACKAGE]
| Argument | Description |
|---|---|
PROJECTDIR | The project directory that should be opened with LiteIDE |
PACKAGE | Optional: the package your PROJECTDIR should be mounted to |
| Environment variable | Description |
|---|---|
LITEIDE_INI | Path to a liteide.ini file that should be used. Default: $PROJECTDIR/liteide.ini |
LITEIDE_VERSION | LiteIDE version |
LITEIDE_IMAGE | full LiteIDE Docker image name (overwrites LITEIDE_VERSION) |
LITEIDE_CACHE | if set to on the directory .liteide-cache is mounted to the container's GOPATH |
In order to run a container using this image directly you need to provide several options:
CHOWN environment variable in order to run LiteIDE as your user (not required when using podman)DISPLAY environment variable/etc/machine-id/go directory (GOPATH points to /go)liteide.ini to /tmp/liteide/.config/liteide/liteide.ini within the container (see liteite-example.ini)Example:
docker run --name liteide --rm \
-e CHUSR=$(id -u):$(id -g) \
-e DISPLAY="${DISPLAY}" \
--mount type=bind,src=/tmp/.X11-unix,dst=/tmp/.X11-unix \
--mount type=bind,src=/etc/machine-id,dst=/etc/machine-id \
--mount "type=bind,src=${PROJECTDIR:-.},dst=/go/src/github.com/example/project" \
mgoltzsche/liteide:latest \
/go/src/github.com/example/project
This section explains how to manage LiteIDE's build configuration.
In order to build the whole project independent of your currently
opened file and with the root package's BUILDFLAGS you may want
to lock the build path as follows:
Build Path ConfigurationBUILDFLAGS variable if requiredLock Build Path to the top-level directoryIf you want keep your configuration across IDE restarts or ship it with
your project you need to enter the LiteIDE Docker container and copy
/opt/liteide/home/.config/liteide/liteide.ini to your project dir at
./.liteide.ini.
Content type
Image
Digest
sha256:e9403c480…
Size
462.2 MB
Last updated
6 months ago
docker pull mgoltzsche/liteide