forked from cerc-io/stack-orchestrator
Simple container for testing stack orchestrator
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
FROM alpine:latest
|
||||
|
||||
COPY run.sh /app/run.sh
|
||||
|
||||
ENTRYPOINT ["/app/run.sh"]
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build cerc/test-container
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
docker build -t cerc/test-container:local -f ${SCRIPT_DIR}/Dockerfile $SCRIPT_DIR
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Test if the container's filesystem is old (run previously) or new
|
||||
EXISTSFILENAME=/var/exists
|
||||
echo "Test container starting"
|
||||
if [[ -f "$EXISTSFILENAME" ]];
|
||||
then
|
||||
TIMESTAMP = `cat $EXISTSFILENAME`
|
||||
echo "Filesystem is old, created: $TIMESTAMP"
|
||||
else
|
||||
echo "Filesystem is fresh"
|
||||
echo `date` > $EXISTSFILENAME
|
||||
fi
|
||||
|
||||
# Sleep forever to keep docker happy
|
||||
while true; do sleep 10; done
|
||||
Reference in New Issue
Block a user