Skip to content
Snippets Groups Projects
Unverified Commit f77f3829 authored by Matthias Schiffer's avatar Matthias Schiffer Committed by GitHub
Browse files

Merge pull request #2402 from herbetom/v2021.1.x-container.sh

v2021.1.x: Backport container.sh script
parents e51836ec 2099d8e9
Branches
Tags
No related merge requests found
......@@ -177,6 +177,10 @@ config: $(LUA) FORCE
$(GLUON_ENV) $(LUA) scripts/target_config_check.lua
container: FORCE
@scripts/container.sh
all: config
+@
$(GLUON_ENV) $(LUA) scripts/clean_output.lua
......
File moved
......@@ -40,6 +40,12 @@ freshly installed Debian Stretch system the following packages are required:
* `time` (built-in `time` doesn't work)
We also provide a container environment that already tracks all these dependencies. It quickly gets you up and running, if you already have either Docker or Podman installed locally.
::
./scripts/container.sh
Building the images
-------------------
......
#!/usr/bin/env bash
set -euo pipefail
# move into base directory, in case this script is not executed via `make container`
cd "$(dirname "$0")/.."
# normalize branch name to reflect a valid image name
BRANCH=$(git branch --show-current 2>/dev/null | sed 's/[^a-z0-9-]/_/ig')
TAG="gluon:${BRANCH:-latest}"
if [ "$(command -v podman)" ]
then
podman build -t "${TAG}" contrib/docker
podman run -it --rm --userns=keep-id --volume="$(pwd):/gluon" "${TAG}"
elif [ "$(command -v docker)" ]
then
docker build -t "${TAG}" contrib/docker
docker run -it --rm --volume="$(pwd):/gluon" "${TAG}"
else
1>&2 echo "Please install either podman or docker. Exiting" >/dev/null
exit 1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment