docker-compose

Use Django OAuth2 provider with JupyterHub

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 07:06:26
问题 I'm attempting to run a Django web application that pairs with a JupyterHub server, where users enter via the web app and are then granted access to a notebook server once they've signed in. To facilitate this, I'm attempting to use OAuth2, where Django provides the authentication and JupyterHub verifies users against that. I'm using django-oauth-toolkit to provide the authentication service and linking against it using the Generic OAuthenticator. A docker-compose reference implementation is

docker-compose up and user inputs on stdin

旧时模样 提交于 2020-01-01 05:32:22
问题 Can someone explain (and maybe give a workaround) for the following behavior of docker-compose ? Given the following files : Dockerfile FROM alpine:3.8 COPY ./entrypoint.sh /entrypoint.sh ENTRYPOINT [ "/entrypoint.sh" ] entrypoint.sh #!/bin/sh until [ ! -z "$PLOP" ]; do echo -n 'enter value here: ' read PLOP done echo "Good ... PLOP is $PLOP" exit 1 docker-compose.yml version: '3.7' services: plop: tty: true stdin_open: true image: webofmars/plop:latest The output will be the following: 1) .

Docker Compose: volumes without colon (:)

百般思念 提交于 2020-01-01 04:03:18
问题 I have a docker-compose.yml file with the following: volumes: - .:/usr/app/ - /usr/app/node_modules First option maps current host directory to /usr/app , but what does the second option do? 回答1: The second one creates an anonymous volume. It will be listed in docker volume ls with a long unique id rather than a name. Docker-compose will be able to reuse this if you update your image, but it's easy to lose track of which volume belongs to what with those names, so I recommend always giving

How to control docker-compose build order?

≯℡__Kan透↙ 提交于 2020-01-01 04:01:27
问题 I have three services to build, A、B and C. A should be built in the very first place, because B and C depend on A (they import A as image). I thought they should be built in order but I just find out they are built in some random order? So, how do I control build order in docker-compose.yml ? 回答1: Update: In recent practice, I have found my answer to only pertain to run ordering. Refer to the answer by Quinten Scheppermans and the comment by Authur Weborg about dobi . You can control build

Ubuntu 16.04 - > ERROR: Couldn't connect to Docker daemon - you might need to run `docker-machine start default`

天大地大妈咪最大 提交于 2020-01-01 01:47:09
问题 I am getting error on ubuntu 16.04 "ERROR: Couldn't connect to Docker daemon - you might need to run docker- machine start default . " when i run following command sudo docker-compose up Can any one answer ? 回答1: assuming your environment variables are set using the following shell command : eval "$(docker-machine env default)" then you can find the exact error by running the following shell command: docker-compose --verbose up -d many times its a proxy issue or if your running it with

How can I make my Docker compose “wait-for-it” script invoke the original container ENTRYPOINT or CMD?

一曲冷凌霜 提交于 2020-01-01 01:19:47
问题 According to Controlling startup order in Compose, one can control the order in which Docker Compose starts containers by using a "wait-for-it" script. Script wait-for-it.sh expects both a host:port argument as well as the command that the script should execute when the port is available. The documentation recommends that Docker Compose invoke this script using the entrypoint: option. However, if one uses this option, the container will no longer run its default ENTRYPOINT or CMD because

How can I make my Docker compose “wait-for-it” script invoke the original container ENTRYPOINT or CMD?

可紊 提交于 2020-01-01 01:19:30
问题 According to Controlling startup order in Compose, one can control the order in which Docker Compose starts containers by using a "wait-for-it" script. Script wait-for-it.sh expects both a host:port argument as well as the command that the script should execute when the port is available. The documentation recommends that Docker Compose invoke this script using the entrypoint: option. However, if one uses this option, the container will no longer run its default ENTRYPOINT or CMD because

How to persist data in a dockerized DynamoDB using volumes

余生颓废 提交于 2020-01-01 00:16:09
问题 My docker compose file has two containers and looks like this version: '3' services: dynamodb: image: amazon/dynamodb-local ports: - '8000:8000' networks: - testnetwork audit-server: image: audit-dynamo environment: DYNAMO_URL: 'http://0.0.0.0:8000' command: node app.js ports: - '3000:3000' depends_on: - dynamodb # restart: always networks: - testnetwork networks: testnetwork: My goal is to mount local data to some volume. currently losing data on docker-compose down 回答1: So that image use by

How to translate docker-compose.yml to Dockerrun.aws.json for Django

流过昼夜 提交于 2019-12-31 19:25:00
问题 I am following the instructions at https://docs.docker.com/compose/django/ to get a basic dockerized django app going. I am able to run it locally without a problem but I am having trouble to deploy it to AWS using Elastic Beanstalk. After reading here, I figured that I need to translate docker-compose.yml into Dockerrun.aws.json for it to work. The original docker-compose.yml is version: '2' services: db: image: postgres web: build: . command: python manage.py runserver 0.0.0.0:8000 volumes:

How docker handles multiple mount types?

耗尽温柔 提交于 2019-12-31 17:51:11
问题 This post is somewhat lenglthy but bear with me for a while... Suppose you have an app that sits in /app in your local (host) filesystem with the following structure app |-- index.php |-- foo | `-- file-h1 `-- bar `-- file-h2 Now suppose we have an image (tagged myrepo/app ) that exploits the following data structure opt |-- app | `-- foo | `-- file-c1 If we run a container from that image by mounting host's /app to container's /opt/app as follows docker container run \ -v /app:/opt/app \