From 27af1197fd4ffe52421b428f81992549fae56e63 Mon Sep 17 00:00:00 2001 From: Daniel Thorn Date: Tue, 19 Nov 2024 12:50:20 -0800 Subject: [PATCH] Work around dependabot not updating docker-compose --- docker-compose.yml | 17 ++++++++++++----- docker/images/elasticsearch/Dockerfile | 1 + docker/images/memcached/Dockerfile | 1 + docker/images/postgres/Dockerfile | 1 + docker/images/pubsub-emulator/Dockerfile | 3 +++ 5 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 docker/images/elasticsearch/Dockerfile create mode 100644 docker/images/memcached/Dockerfile create mode 100644 docker/images/postgres/Dockerfile create mode 100644 docker/images/pubsub-emulator/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index 2619279998..f76bc5a1c2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -208,7 +208,9 @@ services: # https://www.elastic.co/guide/en/elasticsearch/reference/8.14/docker.html elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:8.14.3 + build: + context: docker/images/elasticsearch + image: local/socorro_elasticsearch mem_limit: 1g command: - bin/elasticsearch @@ -219,7 +221,9 @@ services: # https://hub.docker.com/_/postgres/ postgresql: - image: postgres:16.4 + build: + context: docker/images/postgres + image: local/socorro_postgres ports: - "8574:5432" environment: @@ -231,8 +235,9 @@ services: # https://cloud.google.com/sdk/docs/downloads-docker # official pubsub emulator pubsub: - # also available as google/cloud-sdk:-emulators - image: gcr.io/google.com/cloudsdktool/google-cloud-cli:463.0.0-emulators + build: + context: docker/images/pubsub-emulator + image: local/socorro_pubsub_emulator command: - gcloud - beta @@ -246,7 +251,9 @@ services: # https://hub.docker.com/_/memcached/ memcached: - image: memcached:1.5.1 + build: + context: docker/images/memcached + image: local/socorro_memcached ports: - "11211:11211" diff --git a/docker/images/elasticsearch/Dockerfile b/docker/images/elasticsearch/Dockerfile new file mode 100644 index 0000000000..e0a068fce4 --- /dev/null +++ b/docker/images/elasticsearch/Dockerfile @@ -0,0 +1 @@ +FROM docker.elastic.co/elasticsearch/elasticsearch:8.14.3@sha256:96ae58e574cb40b2caf8bdebc6dda7b789e1fae7d56346cc83c288374e18b1c2 diff --git a/docker/images/memcached/Dockerfile b/docker/images/memcached/Dockerfile new file mode 100644 index 0000000000..7de209db16 --- /dev/null +++ b/docker/images/memcached/Dockerfile @@ -0,0 +1 @@ +FROM memcached:1.5.1@sha256:fc1826e2cb45307c5ac777b18107f14b53f91572b44bc1f856d3ba2e5d115059 diff --git a/docker/images/postgres/Dockerfile b/docker/images/postgres/Dockerfile new file mode 100644 index 0000000000..7f6869c85e --- /dev/null +++ b/docker/images/postgres/Dockerfile @@ -0,0 +1 @@ +FROM postgres:16.4@sha256:e62fbf9d3e2b49816a32c400ed2dba83e3b361e6833e624024309c35d334b412 diff --git a/docker/images/pubsub-emulator/Dockerfile b/docker/images/pubsub-emulator/Dockerfile new file mode 100644 index 0000000000..49efbe2a60 --- /dev/null +++ b/docker/images/pubsub-emulator/Dockerfile @@ -0,0 +1,3 @@ +# Define this image outside of docker-compose.yml so that it gets dependabot updates +FROM gcr.io/google.com/cloudsdktool/google-cloud-cli:501.0.0-emulators@sha256:4dfc65b1795329f1a94316d3a0eb70a4a37d4813cac0efe05c43b08b2e66d44d +# also available as google/cloud-sdk:-emulators