From 7e9b19b3e447991423063126847bef8b1871432a Mon Sep 17 00:00:00 2001 From: "jason.zhu" Date: Mon, 8 Feb 2021 13:48:57 +1100 Subject: [PATCH] 1. Modified docker-compose.yaml to make it as compose file for prod containers 2. Created docker-compose.debug.yaml from docker-compose.yaml, for dev --- docker-compose.debug.yaml | 62 +++++++++++++++++++++++++++++++++++++++ docker-compose.yaml | 31 +++++++------------- 2 files changed, 73 insertions(+), 20 deletions(-) create mode 100644 docker-compose.debug.yaml diff --git a/docker-compose.debug.yaml b/docker-compose.debug.yaml new file mode 100644 index 0000000..2609a2b --- /dev/null +++ b/docker-compose.debug.yaml @@ -0,0 +1,62 @@ +version: "3" +services: + csharp: + container_name: csharp # image name + image: cruxlight/csharp_sdk:1.0.0 + build: + context: ./c# + target: dev + working_dir: /work + entrypoint: /bin/sh + stdin_open: true + tty: true + volumes: + - ./c#/src/:/work + ports: + - 5500:5000 + golang: + container_name: golang + image: cruxlight/golang_sdk:1.0.0 + build: + context: ./golang + target: dev + working_dir: /work + entrypoint: /bin/sh + stdin_open: true + tty: true + volumes: + - ./golang/src/:/work + ports: + - 5501:5000 + nodejs: + container_name: nodejs + image: cruxlight/nodejs:1.0.0 + build: + context: ./nodejs + target: dev + working_dir: /work + entrypoint: /bin/sh + stdin_open: true + tty: true + volumes: + - ./nodejs/src/:/work + ports: + - 5502:5000 + python: #docker run -it -v ${PWD}:/work -w /work -p 5003:5000 aimvector/python:1.0.0 /bin/sh + container_name: python + image: cruxlight/python:1.0.0 + build: + context: ./python + target: dev + working_dir: /work + entrypoint: /bin/sh + stdin_open: true + tty: true + volumes: + - ./python/src/:/work + ports: + - 5503:5000 + first-public-dockerhub-image: + container_name: first-public-dockerhub-image + image: cruxlight/first-public-dockerhub-image:latest + build: ./first-public-dockerhub-image \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index dcf78bc..d1d4320 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -4,11 +4,8 @@ services: container_name: csharp # image name image: cruxlight/csharp_sdk:1.0.0 build: - context: ./c# - working_dir: /work - entrypoint: /bin/sh - stdin_open: true - tty: true + context: ./c# + target: prod volumes: - ./c#/src/:/work ports: @@ -16,11 +13,9 @@ services: golang: container_name: golang image: cruxlight/golang_sdk:1.0.0 - build: ./golang - working_dir: /work - entrypoint: /bin/sh - stdin_open: true - tty: true + build: + context: ./golang + target: prod volumes: - ./golang/src/:/work ports: @@ -28,11 +23,9 @@ services: nodejs: container_name: nodejs image: cruxlight/nodejs:1.0.0 - build: ./nodejs - working_dir: /work - entrypoint: /bin/sh - stdin_open: true - tty: true + build: + context: ./nodejs + target: prod volumes: - ./nodejs/src/:/work ports: @@ -40,11 +33,9 @@ services: python: #docker run -it -v ${PWD}:/work -w /work -p 5003:5000 aimvector/python:1.0.0 /bin/sh container_name: python image: cruxlight/python:1.0.0 - build: ./python - working_dir: /work - entrypoint: /bin/sh - stdin_open: true - tty: true + build: + context: ./python + target: prod volumes: - ./python/src/:/work ports: