docker-compose

Super Slow Docker Build

血红的双手。 提交于 2021-02-04 17:09:46
问题 I think I'm going to go crazy. I've searched all over and can't seem to find a working solution both here on Stack, GitHub and other far reaches of the interwebs. On this particular project, running docker-compose build is taking FOREVER . It didn't use to be this way, and on other projects that use Docker, it's not an issue at all. And by forever... I'm talking around 10-15 minute build times when it used to only take around 2 minutes tops. I had two separate coworkers DL the same repo (one

Docker compose named volume: find volume on host machine

試著忘記壹切 提交于 2021-02-04 15:18:05
问题 I have a docker-compose.yml: version: '2' services: db: image: mysql:5.7 volumes: - db_data:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: wordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: depends_on: - db image: wordpress:latest ports: - "8000:80" restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_PASSWORD: wordpress volumes: db_data: When I run this docker-compose up -d and then do docker inspect -f '{{ (index

How to use docker in the development phase of a devops life cycle?

﹥>﹥吖頭↗ 提交于 2021-02-04 15:15:31
问题 I have a couple of questions related to the usage of Docker in a development phase. I am going to propose three different scenarios of how I think Docker could be used in a development environment. Let's imagine that we are creating a REST API in Java and Spring Boot. For this I will need a MySQL database. The first scenario is to have a docker-compose for development with the MySQL container and a production docker-compose with MySQL and the Java application (jar) in another container. To

How can I run Selenium tests in a docker container with a visible browser?

六眼飞鱼酱① 提交于 2021-02-02 08:26:02
问题 If I want to run Selenium tests inside a Docker container with a visible (not headless) browser, what are my options? Do I need to use a remote display viewer such as VNC? Is it possible to use a browser on the host? (I.e. a browser that is not in the Docker container). How does this work? Any other option? 回答1: Docker Docker is a software containership platform that provides virtualization from the os. In Docker, all software parts are organised as containers which includes the operating

Port 80 and Port 443 not accessible when published via `ports` in Docker

孤者浪人 提交于 2021-01-29 22:06:53
问题 My ASP.Net Core application is able to connect to a postGres database using Docker and Docker compose successfully(please see Docker-Compose up output below). I am however not able to browse to either the ASP.Net Core application or adminer(Postgres client) on my docker containers, from my PC using the urls http://IP_AddressOfRunningDockerContainer:443 or http://IP_AddressOfRunningDockerContainer:8080 respectively. What could I be missing? Command to get IP address of container(and its output

Docker-Compose Unable to connect to any of the specified MySQL hosts

女生的网名这么多〃 提交于 2021-01-29 21:46:28
问题 i have an existing Project ( API - portal - Mysql ) i have used Docker-compose without dockerfile i publish the API - Portal and put them all in folder and then Docker-compose up i can reach the api by getting the local values in it but if i tried to reach mysql trough the API using postman its not working even when i open the frontend website ConnectionString: "ConnectionString": "server=xmysql;port=4406;Database=sbs_hani;User ID=hani;Password=123456; persistsecurityinfo=True;Charset=utf8;

Port 80 and Port 443 not accessible when published via `ports` in Docker

北城以北 提交于 2021-01-29 20:41:50
问题 My ASP.Net Core application is able to connect to a postGres database using Docker and Docker compose successfully(please see Docker-Compose up output below). I am however not able to browse to either the ASP.Net Core application or adminer(Postgres client) on my docker containers, from my PC using the urls http://IP_AddressOfRunningDockerContainer:443 or http://IP_AddressOfRunningDockerContainer:8080 respectively. What could I be missing? Command to get IP address of container(and its output

redis connection error within docker container

泪湿孤枕 提交于 2021-01-29 19:59:32
问题 I'm trying to setup a light-weight RQ task queue app running in Docker. I keep on getting this error: ValueError: Redis URL must specify one of the following schemes (redis://, rediss://, unix://) When grabbing from environmental variable ( os.getenv() ) it doesn't work, but somehow when hard-coding in redis://redis:6379/0 , it seems to work. However, this is not really a long-term solution in my opinion. I looked at: link1 and link2, but there wasn't really a solution, the thread went dead.

How to provide docker image tag dynamically to docker-compose.yml in Azure Release Pipeline Task?

冷暖自知 提交于 2021-01-29 19:30:11
问题 I have docker-compose.yml file present in the repository. I have added the image attribute in one of the services to pull the docker images. I have not hard coded the docker image and docker tag and planning to pass these arguments at the runtime to docker-compose.yml file. How to pass the runtime arguments like IMAGE_TAG=82 , IMAGE_NAME=app1 to the docker-compose.yml file? 回答1: You can use variables in the docker-compose file for the image & tag: version: '3' services: redis-server: image: $

Thymeleaf fails to resolve templates when running inside Docker container

荒凉一梦 提交于 2021-01-29 17:38:05
问题 I have a standard project structure for SpringBoot apps: When I build and run my app like this: mvn clean install mvn spring-boot:run everything works. When I try to run inside docker container specified by docker-compose file: version: "3.1" services: app: container_name: thdnes-app restart: always build: context: ./ dockerfile: Dockerfile ports: - "8080:8080" and Dockerfile: FROM openjdk:11-jdk VOLUME /tmp COPY /target/thdnes-0.0.1-SNAPSHOT.jar app.jar ENTRYPOINT ["java","-Djava.security