Page MenuHomeDevCentral

D2370.id5963.diff
No OneTemporary

D2370.id5963.diff

diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -73,6 +73,9 @@
as the OpenSSH client requires the running user to exist, and so requires
a little more than just add `--user $UID` to the docker run command.
+The `contrib/arc` offers also a `arc update` command to pull the latest
+nasqueron/arcanist image and rebuild the user image if needed.
+
Both wrappers solve the conduit issue by redirecting the output to logging,
exiting the container when done, waiting a little time then reading the log.
diff --git a/contrib/arc b/contrib/arc
--- a/contrib/arc
+++ b/contrib/arc
@@ -28,11 +28,15 @@
# Logs are default disabled
PRINT_LOG=0
+UPDATE_MODE=0
+
if [ "$1" = "shell" ]; then
# Launch commands
# in the container bash shell
shift
COMMAND=bash
+elif [ "$1" = "update" ]; then
+ UPDATE_MODE=1
else
# Launch arc
mkdir -p ~/.arc
@@ -65,6 +69,16 @@
test -v $UID && UID=$(id -u)
test -v $GID && GID=$(id -g)
+if [ $UPDATE_MODE -eq 1 ]; then
+ docker pull $BASE_IMAGE
+
+ # Rebuild user image
+ IMAGE=$BASE_IMAGE:$UID-$GID
+ test $UID -eq 0 || build_user_image
+
+ exit
+fi
+
if [ $UID -eq 0 ]; then
IMAGE=$BASE_IMAGE
CONTAINER_USER_HOME=/root

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 14:35 (21 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2249493
Default Alt Text
D2370.id5963.diff (1 KB)

Event Timeline