docker-compose

Fallback for environment variables with docker-compose

僤鯓⒐⒋嵵緔 提交于 2020-12-30 06:57:26
问题 Given the following configuration: mysql: environment: MY_MYSQL_PORT: image: mysql ports: - "${MY_MYSQL_PORT}:3306" There's a way to provide a fallback value for MY_MYSQL_PORT without relying on wrapper scripts? I already tested like bash ${MY_MYSQL_PORT-3306} but it doesn't work. 回答1: They implemented that feature with compose 1.9 release: Added support for shell-style inline defaults in variable interpolation. The supported forms are ${FOO-default} (fall back if FOO is unset) and ${FOO:

ERR_EMPTY_RESPONSE from docker container

你。 提交于 2020-12-30 05:09:14
问题 I've been trying to figure this out in the last hours but I'm stuck. I have a very simple Dockerfile which looks like this: FROM alpine:3.6 COPY gempbotgo / COPY configs /configs CMD ["/gempbotgo"] EXPOSE 8025 gempbotgo is just an go binary which runs a webserver and some other stuff. The webserver is running on 8025 and should answer with an hello world. My issue is with exposing ports. I ran my container like this (after building it) docker run --rm -it -p 8025:8025 asd Everything seems

ERR_EMPTY_RESPONSE from docker container

安稳与你 提交于 2020-12-30 05:06:14
问题 I've been trying to figure this out in the last hours but I'm stuck. I have a very simple Dockerfile which looks like this: FROM alpine:3.6 COPY gempbotgo / COPY configs /configs CMD ["/gempbotgo"] EXPOSE 8025 gempbotgo is just an go binary which runs a webserver and some other stuff. The webserver is running on 8025 and should answer with an hello world. My issue is with exposing ports. I ran my container like this (after building it) docker run --rm -it -p 8025:8025 asd Everything seems

ERR_EMPTY_RESPONSE from docker container

不问归期 提交于 2020-12-30 05:05:59
问题 I've been trying to figure this out in the last hours but I'm stuck. I have a very simple Dockerfile which looks like this: FROM alpine:3.6 COPY gempbotgo / COPY configs /configs CMD ["/gempbotgo"] EXPOSE 8025 gempbotgo is just an go binary which runs a webserver and some other stuff. The webserver is running on 8025 and should answer with an hello world. My issue is with exposing ports. I ran my container like this (after building it) docker run --rm -it -p 8025:8025 asd Everything seems

ERR_EMPTY_RESPONSE from docker container

匆匆过客 提交于 2020-12-30 05:05:07
问题 I've been trying to figure this out in the last hours but I'm stuck. I have a very simple Dockerfile which looks like this: FROM alpine:3.6 COPY gempbotgo / COPY configs /configs CMD ["/gempbotgo"] EXPOSE 8025 gempbotgo is just an go binary which runs a webserver and some other stuff. The webserver is running on 8025 and should answer with an hello world. My issue is with exposing ports. I ran my container like this (after building it) docker run --rm -it -p 8025:8025 asd Everything seems

Passing JAVA_OPTS to spring boot application through docker-compose

喜你入骨 提交于 2020-12-30 02:22:12
问题 I am creating a docker image using below configuration. Once image is ready i want to pass JAVA_OPTS to my docker container, so it can be passed to my spring boot application. Whenever i try to bring up the container i am getting "runtime create failed: container_linux.go:348: starting container process caused "exec: \"java $JAVA_OPTS\": executable file not found in $PATH": unknown" error. Am i missing something ? Any help is really appreciated Dockerfile FROM openjdk:8-jdk-alpine LABEL

Passing JAVA_OPTS to spring boot application through docker-compose

こ雲淡風輕ζ 提交于 2020-12-30 02:18:43
问题 I am creating a docker image using below configuration. Once image is ready i want to pass JAVA_OPTS to my docker container, so it can be passed to my spring boot application. Whenever i try to bring up the container i am getting "runtime create failed: container_linux.go:348: starting container process caused "exec: \"java $JAVA_OPTS\": executable file not found in $PATH": unknown" error. Am i missing something ? Any help is really appreciated Dockerfile FROM openjdk:8-jdk-alpine LABEL

docker-compose image named: “prefix_%s_1” instead of “%s”

 ̄綄美尐妖づ 提交于 2020-12-28 09:57:05
问题 When I set up a couple of Docker containers in docker-compose.yaml file with links, the name of the containers ends up being of the format prefix_%s_1 instead of %s , and the alias in /etc/hosts on the linking container is the same. Why is the alias of the redis container test_redis_1 instead of redis ? Here are the relevant files and output: # docker-compose.yaml monkey: build: ../../monkey dockerfile: test.Dockerfile links: - redis:redis ports: - "9006:9006" redis: build: ../storage/redis

How Can i make Docker App Accessible On Public External IP? [closed]

女生的网名这么多〃 提交于 2020-12-27 07:16:44
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 8 days ago . Improve this question I have a Nuxt Js app running under docker . Everything is running fine i can access the app on http://172.20.0.3:3000/. However i would like to access the app via http://external_ip. How can i do this? 来源: https://stackoverflow.com/questions/65338786/how-can-i-make-docker-app

How Can i make Docker App Accessible On Public External IP? [closed]

萝らか妹 提交于 2020-12-27 07:16:25
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 8 days ago . Improve this question I have a Nuxt Js app running under docker . Everything is running fine i can access the app on http://172.20.0.3:3000/. However i would like to access the app via http://external_ip. How can i do this? 来源: https://stackoverflow.com/questions/65338786/how-can-i-make-docker-app