Page MenuHomeDevCentral

D2975.id7594.diff
No OneTemporary

D2975.id7594.diff

diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
# Nasqueron dev workspace
Install a development workspace as a container. The container contains
-a Go environment, ready to use.
+a comprehensive development environment, ready to use.
## Built it, run it
```
$ git clone https://devcentral.nasqueron.org/source/docker-dev-workspace
-$ docker build -t nasqueron/dev-workspace-go .
-$ support/workspace.sh
+$ (cd flavours/go && docker build -t nasqueron/dev-workspace-go .)
+$ support/workspace.sh go shell
```
The command `workspace` is a wrapper to run your container,
@@ -23,14 +23,14 @@
## Flavours
-Currently, we've a workspace intended for Go development, with Python
-Git Arcanist in support.
It probably makes sense to create several flavours instead of trying
to package everything in one image.
### Go
+This workspace is intended for Go development, with Python, Git and Arcanist.
+
Download the release specified in the GO_VERSION environment variable
at image build time, so we can provide an up-to-date Go version.
diff --git a/Dockerfile b/flavours/go/Dockerfile
rename from Dockerfile
rename to flavours/go/Dockerfile
diff --git a/files/root/.bashrc b/flavours/go/files/root/.bashrc
rename from files/root/.bashrc
rename to flavours/go/files/root/.bashrc
diff --git a/support/workspace.sh b/support/workspace.sh
--- a/support/workspace.sh
+++ b/support/workspace.sh
@@ -10,10 +10,24 @@
# as a Docker container
# License: Trivial work, not eligible to copyright
# If copyright eligible, BSD-2-Clause
-# Image: nasqueron/dev-workspace-go
+# Image: nasqueron/dev-workspace-<flavour>
# -------------------------------------------------------------
-BASE_IMAGE=nasqueron/dev-workspace-go
+set -e
+
+# -------------------------------------------------------------
+# Parse arguments
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+if [ $# -lt 2 ]; then
+ echo "Usage: $(basename "$0") <flavour> <command>" >&2
+ exit 1
+fi
+
+FLAVOUR=$1
+shift
+
+BASE_IMAGE=nasqueron/dev-workspace-$FLAVOUR
if [ -t 0 ]; then
# If a stdin entry is available

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 7, 18:23 (21 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2180672
Default Alt Text
D2975.id7594.diff (2 KB)

Event Timeline