Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ A limitation in the current NM REST API disallows multiple controls in a single

It is recommended to build all containers using the instructions in this document when practical for local deployment. To support other use cases, all images may also be built once and exported to a tar.gz using standard tools for offline deploments.

The script `export.sh` will create a single .tar.gz file suitable for import by Docker or Podman without requiring access to external resources.
The script `export.sh` will build or pull all necessary images and create a single .tar.gz file suitable for import by Docker or Podman without requiring access to external resources.

The tar.gz file can be imported using `podman|docker import anms-${VERSION}-images.tar.gz`

Expand Down
2 changes: 1 addition & 1 deletion anms.Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ COPY deps/dtnma-adms /usr/src/dtnma-adms


# This is a postgres stateful database with data definition startup SQL scripts
FROM postgres:14 AS anms-sql
FROM docker.io/library/postgres:14 AS anms-sql

COPY deps/anms_db_tables/*.sql /docker-entrypoint-initdb.d/
COPY deps/dtnma-tools/refdb-sql/postgres/Database_Scripts/*.sql /docker-entrypoint-initdb.d/
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ services:

mqtt-broker:
hostname: mqtt-broker
image: ${DOCKER_IMAGE_PREFIX}mqtt-broker
image: ${DOCKER_IMAGE_PREFIX}mqtt-broker:${DOCKER_IMAGE_TAG}
build:
dockerfile: anms.Containerfile
target: mqtt-broker
Expand Down
12 changes: 9 additions & 3 deletions export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
set -e

GITTAG=$(git describe --always --tags --dirty)
ANMS_VERSION=${ANMS_VERSION:=${GITTAG}}
export ANMS_VERSION=${ANMS_VERSION:=${GITTAG}}
export DOCKER_IMAGE_TAG=${ANMS_VERSION}
OUTFILE="anms-${ANMS_VERSION}-images.tar.gz"

# Get List of Images
if command -v podman-compose &> /dev/null; then
COMPOSE_CMD="podman-compose"
elif command -v docker-compose &> /dev/null; then
Expand All @@ -18,7 +18,13 @@ else
exit 1
fi

IMAGES=$(${COMPOSE_CMD} -f docker-compose.yml -f testenv-compose.yml config | grep --color=auto 'image:' | awk '{print $2}' | sort -u | less)
# Build or pull images needed
COMPOSE_OPTS="-f docker-compose.yml -f testenv-compose.yml --profile full --profile dev --parallel 1"
${COMPOSE_CMD} ${COMPOSE_OPTS} --podman-build-args='--format docker' build
${COMPOSE_CMD} ${COMPOSE_OPTS} pull

# Get List of Images used
IMAGES=$(${COMPOSE_CMD} ${COMPOSE_OPTS} config | grep --color=auto 'image:' | awk '{print $2}' | sort -u)
echo "${COMPOSE_CMD} reports the following images: ${IMAGES}"

# Determine base command (docker or podman)
Expand Down
Loading