From 2054e6937f3b2d0980b456201d6002b5c0037257 Mon Sep 17 00:00:00 2001 From: Gary White Jr Date: Mon, 15 Aug 2022 16:26:58 -0400 Subject: [PATCH 1/3] cache_to inline and cache_from --- docker-compose.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 07cca94df4..79685cda9b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -52,6 +52,10 @@ services: build: context: ./ dockerfile: ./src/adservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-adservice + cache_to: + - inline # see https://github.com/moby/buildkit#export-cache ports: - "${AD_SERVICE_PORT}" environment: @@ -70,6 +74,10 @@ services: build: context: ./ dockerfile: ./src/cartservice/src/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice + cache_to: + - inline # see https://github.com/moby/buildkit#export-cache ports: - "${CART_SERVICE_PORT}" environment: @@ -90,6 +98,10 @@ services: build: context: ./ dockerfile: ./src/checkoutservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-checkoutservice + cache_to: + - inline # see https://github.com/moby/buildkit#export-cache ports: - "${CHECKOUT_SERVICE_PORT}" environment: @@ -121,6 +133,10 @@ services: args: - GRPC_VERSION=1.46.0 - OPENTELEMETRY_VERSION=1.4.0 + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice + cache_to: + - inline # see https://github.com/moby/buildkit#export-cache ports: - "${CURRENCY_SERVICE_PORT}" environment: @@ -137,6 +153,10 @@ services: container_name: email-service build: context: ./src/emailservice + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice + cache_to: + - inline # see https://github.com/moby/buildkit#export-cache ports: - "${EMAIL_SERVICE_PORT}" environment: @@ -155,6 +175,10 @@ services: build: context: ./ dockerfile: ./src/frontend/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-frontend + cache_to: + - inline # see https://github.com/moby/buildkit#export-cache ports: - "${FRONTEND_PORT}:${FRONTEND_PORT}" environment: @@ -190,6 +214,10 @@ services: build: context: ./ dockerfile: ./src/paymentservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice + cache_to: + - inline # see https://github.com/moby/buildkit#export-cache ports: - "${PAYMENT_SERVICE_PORT}" environment: @@ -207,6 +235,10 @@ services: build: context: ./ dockerfile: ./src/productcatalogservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice + cache_to: + - inline # see https://github.com/moby/buildkit#export-cache ports: - "${PRODUCT_CATALOG_SERVICE_PORT}" environment: @@ -224,6 +256,10 @@ services: build: context: ./ dockerfile: ./src/recommendationservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice + cache_to: + - inline # see https://github.com/moby/buildkit#export-cache ports: - "${RECOMMENDATION_SERVICE_PORT}" depends_on: @@ -244,6 +280,10 @@ services: build: context: ./ dockerfile: ./src/shippingservice/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-shippingservice + cache_to: + - inline # see https://github.com/moby/buildkit#export-cache ports: - "${SHIPPING_SERVICE_PORT}" environment: @@ -290,6 +330,10 @@ services: build: context: ./ dockerfile: ./src/loadgenerator/Dockerfile + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator + cache_to: + - inline # see https://github.com/moby/buildkit#export-cache environment: - FRONTEND_ADDR - USERS From 1e7b992a3339390a468a17cdd09dce6fc0d19b22 Mon Sep 17 00:00:00 2001 From: Gary White Jr Date: Mon, 22 Aug 2022 11:52:40 -0400 Subject: [PATCH 2/3] drop -alpha and update version --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 1e3f671459..a61a68e6da 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ # compose -IMAGE_VERSION=0.1.0 +IMAGE_VERSION=v0.3.4 IMAGE_NAME=ghcr.io/open-telemetry/demo # Collector From b95674a6536326c4054243418bb8f49857e44a19 Mon Sep 17 00:00:00 2001 From: Gary White Jr Date: Mon, 22 Aug 2022 11:56:10 -0400 Subject: [PATCH 3/3] comment all but loadservice --- docker-compose.yml | 76 ++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 79685cda9b..0dc296e4ae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -52,10 +52,10 @@ services: build: context: ./ dockerfile: ./src/adservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-adservice - cache_to: - - inline # see https://github.com/moby/buildkit#export-cache + # cache_from: + # - ${IMAGE_NAME}:${IMAGE_VERSION}-adservice + # cache_to: + # - inline # see https://github.com/moby/buildkit#export-cache ports: - "${AD_SERVICE_PORT}" environment: @@ -74,10 +74,10 @@ services: build: context: ./ dockerfile: ./src/cartservice/src/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice - cache_to: - - inline # see https://github.com/moby/buildkit#export-cache + # cache_from: + # - ${IMAGE_NAME}:${IMAGE_VERSION}-cartservice + # cache_to: + # - inline # see https://github.com/moby/buildkit#export-cache ports: - "${CART_SERVICE_PORT}" environment: @@ -133,10 +133,10 @@ services: args: - GRPC_VERSION=1.46.0 - OPENTELEMETRY_VERSION=1.4.0 - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice - cache_to: - - inline # see https://github.com/moby/buildkit#export-cache + # cache_from: + # - ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice + # cache_to: + # - inline # see https://github.com/moby/buildkit#export-cache ports: - "${CURRENCY_SERVICE_PORT}" environment: @@ -153,10 +153,10 @@ services: container_name: email-service build: context: ./src/emailservice - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice - cache_to: - - inline # see https://github.com/moby/buildkit#export-cache + # cache_from: + # - ${IMAGE_NAME}:${IMAGE_VERSION}-emailservice + # cache_to: + # - inline # see https://github.com/moby/buildkit#export-cache ports: - "${EMAIL_SERVICE_PORT}" environment: @@ -175,10 +175,10 @@ services: build: context: ./ dockerfile: ./src/frontend/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-frontend - cache_to: - - inline # see https://github.com/moby/buildkit#export-cache + # cache_from: + # - ${IMAGE_NAME}:${IMAGE_VERSION}-frontend + # cache_to: + # - inline # see https://github.com/moby/buildkit#export-cache ports: - "${FRONTEND_PORT}:${FRONTEND_PORT}" environment: @@ -214,10 +214,10 @@ services: build: context: ./ dockerfile: ./src/paymentservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice - cache_to: - - inline # see https://github.com/moby/buildkit#export-cache + # cache_from: + # - ${IMAGE_NAME}:${IMAGE_VERSION}-paymentservice + # cache_to: + # - inline # see https://github.com/moby/buildkit#export-cache ports: - "${PAYMENT_SERVICE_PORT}" environment: @@ -235,10 +235,10 @@ services: build: context: ./ dockerfile: ./src/productcatalogservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice - cache_to: - - inline # see https://github.com/moby/buildkit#export-cache + # cache_from: + # - ${IMAGE_NAME}:${IMAGE_VERSION}-productcatalogservice + # cache_to: + # - inline # see https://github.com/moby/buildkit#export-cache ports: - "${PRODUCT_CATALOG_SERVICE_PORT}" environment: @@ -256,10 +256,10 @@ services: build: context: ./ dockerfile: ./src/recommendationservice/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice - cache_to: - - inline # see https://github.com/moby/buildkit#export-cache + # cache_from: + # - ${IMAGE_NAME}:${IMAGE_VERSION}-recommendationservice + # cache_to: + # - inline # see https://github.com/moby/buildkit#export-cache ports: - "${RECOMMENDATION_SERVICE_PORT}" depends_on: @@ -300,6 +300,10 @@ services: container_name: feature-flag-service build: context: ./src/featureflagservice + # cache_from: + # - ${IMAGE_NAME}:${IMAGE_VERSION}-featureflagservice + # cache_to: + # - inline # see https://github.com/moby/buildkit#export-cache ports: - "${FEATURE_FLAG_SERVICE_PORT}:${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API @@ -330,10 +334,10 @@ services: build: context: ./ dockerfile: ./src/loadgenerator/Dockerfile - cache_from: - - ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator - cache_to: - - inline # see https://github.com/moby/buildkit#export-cache + # cache_from: + # - ${IMAGE_NAME}:${IMAGE_VERSION}-loadgenerator + # cache_to: + # - inline # see https://github.com/moby/buildkit#export-cache environment: - FRONTEND_ADDR - USERS