Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add versions to the docker files #450

Merged
merged 2 commits into from
Dec 13, 2023
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
12 changes: 9 additions & 3 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,16 @@ TIMESTAMP := $(shell /bin/date "+%Y%m%d%H%M%S")
all : $(addprefix build_,$(IMAGES))

rebuild_% : repository
@ docker build $(DOCKER_ARGS) --build-arg REBUILD=$(TIMESTAMP) --tag pdo_$* \
@ docker build $(DOCKER_ARGS) \
--build-arg REBUILD=$(TIMESTAMP) \
--build-arg PDO_VERSION=$(shell cd repository; bin/get_version) \
--tag pdo_$*:$(shell cd repository; bin/get_version) \
--file $(SCRIPT_DIR)/pdo_$*.dockerfile .

build_% : repository
@ docker build $(DOCKER_ARGS) --tag pdo_$* \
@ docker build $(DOCKER_ARGS) \
--build-arg PDO_VERSION=$(shell cd repository; bin/get_version) \
--tag pdo_$*:$(shell cd repository; bin/get_version) \
--file $(SCRIPT_DIR)/pdo_$*.dockerfile .

clean_% :
Expand Down Expand Up @@ -106,7 +111,8 @@ TEST_FILES += -f test.yaml

build_test : repository
PDO_USER_UID=$(PDO_USER_UID) PDO_GROUP_UID=$(PDO_GROUP_UID) \
docker-compose $(TEST_FILES) build
docker-compose $(TEST_FILES) build \
--build-arg PDO_VERSION=$(shell cd repository; bin/get_version)

test : clean_config clean_repository build_base build_services_base build_ccf_base build_test
docker-compose $(TEST_FILES) up --abort-on-container-exit
Expand Down
3 changes: 2 additions & 1 deletion docker/pdo_ccf.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# limitations under the License.
# ------------------------------------------------------------------------------

FROM pdo_ccf_base
ARG PDO_VERSION
FROM pdo_ccf_base:${PDO_VERSION}

# -----------------------------------------------------------------
# set up the PDO sources
Expand Down
3 changes: 2 additions & 1 deletion docker/pdo_client.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# limitations under the License.
# ------------------------------------------------------------------------------

FROM pdo_base
ARG PDO_VERSION
FROM pdo_base:${PDO_VERSION}

# -----------------------------------------------------------------
# -----------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion docker/pdo_services.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# limitations under the License.
# ------------------------------------------------------------------------------

FROM pdo_services_base
ARG PDO_VERSION
FROM pdo_services_base:${PDO_VERSION}

# -----------------------------------------------------------------
# set up the PDO sources
Expand Down
3 changes: 2 additions & 1 deletion docker/pdo_services_base.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# limitations under the License.
# ------------------------------------------------------------------------------

FROM pdo_base
ARG PDO_VERSION
FROM pdo_base:${PDO_VERSION}

ARG UBUNTU_VERSION=20.04
ARG UBUNTU_NAME=focal
Expand Down
3 changes: 3 additions & 0 deletions docker/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ services:
ccf_container:
build:
args:
PDO_VERSION: ${PDO_VERSION}
PDO_HOSTNAME: localhost
PDO_LEDGER_URL: http://localhost:6600
entrypoint: /project/pdo/tools/run_ccf_tests.sh

services_container:
build:
args:
PDO_VERSION: ${PDO_VERSION}
PDO_HOSTNAME: localhost
PDO_LEDGER_URL: http://localhost:6600
PDO_LOG_LEVEL: ${PDO_LOG_LEVEL:-info}
Expand All @@ -34,6 +36,7 @@ services:
client_container:
build:
args:
PDO_VERSION: ${PDO_VERSION}
PDO_HOSTNAME: localhost
PDO_LEDGER_URL: http://localhost:6600
PDO_LOG_LEVEL: ${PDO_LOG_LEVEL:-info}
Expand Down
Loading