From 75b7b693187d4c6b591230f03ebb4f4d366b4bb0 Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Mon, 8 Apr 2024 11:54:39 +0100 Subject: [PATCH] Use preview image locally and latest image in production --- Dockerfile | 4 +++- docker-compose.yml | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 86a3d54..4e50e31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM ghcr.io/nationalarchives/tna-python:latest +ARG IMAGE_TAG=latest + +FROM ghcr.io/nationalarchives/tna-python:"$IMAGE_TAG" # Copy in the application code COPY --chown=app . . diff --git a/docker-compose.yml b/docker-compose.yml index cbb6f80..851f519 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,10 @@ version: "3" services: app: - build: . + build: + context: . + args: + IMAGE_TAG: preview environment: - ENVIRONMENT=develop - SECRET_KEY=abc123