Merge pull request #31 from cerc-io/dboreham/test-container

Simple container for testing stack orchestrator
This commit is contained in:
David Boreham 2022-10-30 20:41:54 -06:00 committed by GitHub
commit 7a6bebed73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,5 @@
version: "3.2"
services:
test:
image: cerc/test-container:local
restart: always

View File

@ -0,0 +1,5 @@
FROM alpine:latest
COPY run.sh /app/run.sh
ENTRYPOINT ["/app/run.sh"]

View File

@ -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

View File

@ -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

View File

@ -11,4 +11,5 @@ cerc/ipld-eth-server
cerc/laconicd cerc/laconicd
cerc/laconic-cns-cli cerc/laconic-cns-cli
cerc/fixturenet-eth-geth cerc/fixturenet-eth-geth
cerc/fixturenet-eth-lighthouse cerc/fixturenet-eth-lighthouse
cerc/test-container

View File

@ -9,3 +9,4 @@ lighthouse
prometheus-grafana prometheus-grafana
laconicd laconicd
fixturenet-eth fixturenet-eth
test