A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/alodex/envbuilder below:

alodex/envbuilder: Build development environments from a Dockerfile on Docker, Kubernetes, and OpenShift. Enable developers to modify their development environment quickly.

(Video created using asciinema and agg)

Build development environments from a Dockerfile on Docker, Kubernetes, and OpenShift. Allow developers to modify their environment in a tight feedback loop.

The easiest way to get started is by running the envbuilder Docker container that clones a repository specified by ENVBUILDER_GIT_URL, builds the image from a Dockerfile or devcontainer.json, and runs the $ENVBUILDER_INIT_SCRIPT in the freshly built container.

Tips:

docker run -it --rm
    -v /tmp/envbuilder:/workspaces
    -e ENVBUILDER_GIT_URL=https://github.com/coder/envbuilder-starter-devcontainer
    -e ENVBUILDER_INIT_SCRIPT=bash
    ghcr.io/coder/envbuilder

Edit .devcontainer/Dockerfile to add htop:

vim .devcontainer/Dockerfile
- RUN apt-get install vim sudo -y
+ RUN apt-get install vim sudo htop -y

Exit the container and re-run the docker run command. After the build completes, htop should be available in the container! 🥳

To explore more examples, tips, and advanced usage, check out the following guides:

The ENVBUILDER_SETUP_SCRIPT environment variable dynamically configures the user and init command (PID 1) after the container build process.

Note: TARGET_USER is passed to the setup script to specify who will execute ENVBUILDER_INIT_COMMAND (e.g., code).

Write the following to $ENVBUILDER_ENV to shape the container's init process:

# init.sh - Change the init if systemd exists
if command -v systemd >/dev/null; then
  echo "Hey 👋 $TARGET_USER"
  echo ENVBUILDER_INIT_COMMAND=systemd >> $ENVBUILDER_ENV
else
  echo ENVBUILDER_INIT_COMMAND=bash >> $ENVBUILDER_ENV
fi

# Run envbuilder with the setup script
docker run -it --rm
  -v ./:/some-dir
  -e ENVBUILDER_SETUP_SCRIPT=/some-dir/init.sh
  ...

You can see all the supported environment variables in this document.

This document keeps track of what parts of the Dev Container specification Envbuilder currently supports.

Feel free to create a new issue if you'd like Envbuilder to support a particular feature.

Devfiles automate and simplify development by adopting existing devfiles available in the public community registry.

Issue: #113

Building envbuilder currently requires a Linux system.

On macOS or Windows systems, we recommend using a VM or the provided .devcontainer for development.

Additional Requirements:

Makefile targets:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4