Docker magento error - magento

I try to install magento via docker and i got errors. I follow this tutorial
https://github.com/andreaskoch/dockerized-magento
WARNING: Image for service installer was built because it did not already exist. To rebuild this image you must use docker-compose build or docker-compose up --build.
Creating dockerizedmagento_mysql_1
Creating dockerizedmagento_fullpagecache_1
Creating dockerizedmagento_sessions_1
Creating dockerizedmagento_cache_1
Creating dockerizedmagento_solr_1
Creating dockerizedmagento_php_1
Creating dockerizedmagento_nginx_1
ERROR: for nginx driver failed programming external connectivity on endpoint dockerizedmagento_nginx_1 (f4231c1e80b680a8a59961cb3658c55d2b64cc3a3e980e09f8b94531a608892f): Error starting userland proxy: listen tcp 0.0.0.0:80: listen: address already in use
Traceback (most recent call last):
File "", line 3, in
File "compose/cli/main.py", line 63, in main
AttributeError: 'ProjectError' object has no attribute 'msg'
docker-compose returned -1
caner#vegan:~/magento-caner/dockerized-magento$ ./magento start
dockerizedmagento_fullpagecache_1 is up-to-date
dockerizedmagento_solr_1 is up-to-date
dockerizedmagento_mysql_1 is up-to-date
dockerizedmagento_sessions_1 is up-to-date
dockerizedmagento_cache_1 is up-to-date
dockerizedmagento_php_1 is up-to-date
Starting dockerizedmagento_nginx_1
ERROR: for nginx driver failed programming external connectivity on endpoint dockerizedmagento_nginx_1 (3e4887cb50ff899b19f660d3886f03d6682cf6332373912c0aa9e3932f4d8e5c): Error starting userland proxy: listen tcp 0.0.0.0:80: listen: address already in use
Traceback (most recent call last):
File "", line 3, in
File "compose/cli/main.py", line 63, in main
AttributeError: 'ProjectError' object has no attribute 'msg'
docker-compose returned -1
caner#vegan:~/magento-caner/dockerized-magento$
after a whihle, the error is when i open the page
403 Forbidden
nginx/1.11.3
which are given from console :
installer_1 |
installer_1 | Fixing filesystem permissions
installer_1 | Installation fininished
installer_1 | Frontend: http://dockerized-magento.local/
installer_1 | Backend: http://dockerized-magento.local/admin
installer_1 | - Username: admin
installer_1 | - Password: password123
images are
fabf508632a6 dockerizedmagentomaster_installer "/bin/install.sh" 4 minutes ago Up 4 minutes dockerizedmagentomaster_installer_1
44a8db375577 nginx:latest "nginx -g 'daemon off" 4 minutes ago Up 4 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp dockerizedmagentomaster_nginx_1
73883d1ad863 dockerizedmagentomaster_php "php-fpm" 4 minutes ago Up 4 minutes 9000/tcp dockerizedmagentomaster_php_1
6c7e24a5f1b6 dockerizedmagentomaster_solr "/usr/bin/java -Xmx10" 4 minutes ago Up 4 minutes 8983/tcp dockerizedmagentomaster_solr_1
824765d3e79d mysql:5.5 "docker-entrypoint.sh" 4 minutes ago Up 4 minutes 0.0.0.0:3306->3306/tcp dockerizedmagentomaster_mysql_1
515fde576688 redis:latest "docker-entrypoint.sh" 28 minutes ago Up 4 minutes 6379/tcp dockerizedmagentomaster_sessions_1
e6a583fda276 redis:latest "docker-entrypoint.sh" 28 minutes ago Up 4 minutes 6379/tcp dockerizedmagentomaster_cache_1
e449459d1355 redis:latest "docker-entrypoint.sh" 28 minutes ago Up 4 minutes 6379/tcp dockerizedmagentomaster_fullpagecache_1
Also
[RuntimeException]
installer_1 | Magento folder could not be detected
installer_1 |
Also i tried with my env and yml:
yml
web:
image: alexcheng/magento
ports:
- "8081:80"
links:
- mysql
env_file:
- env
mysql:
image: mysql:5.6.23
env_file:
- env
ports:
- "3306:3306
env
MYSQL_DATABASE=magento
MYSQL_USER=magento
MYSQL_PASSWORD=magento
MYSQL_ROOT_PASSWORD=magento
MAGENTO_ADMIN_FIRSTNAME=Admin
MAGENTO_ADMIN_LASTNAME=MyStore
MAGENTO_ADMIN_EMAIL=admin#example.com
MAGENTO_ADMIN_USERNAME=admin
MAGENTO_ADMIN_PASSWORD=magentorocks1
this time when i go to
http://localhost:8081/
it forwards me to
http://localhost:8081/index.php/install/wizard/config/
so that i can start installation wizard bt at that time, it doesno accept my username or another fields.
It says database connection error.

Related

Airflow doesn't work on localhost

I have tried to start Apache Airflow UI on my local machine (Windows 11) but have failed so far. Here are the list of works that I have done so far.
The contents of the 'docker-compose-LocalExecutor.yml' file are as follows:
version: '3.7'
services:
postgres:
image: postgres:9.6
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
logging:
options:
max-size: 10m
max-file: "3"
webserver:
image: puckel/docker-airflow:1.10.9
restart: always
depends_on:
- postgres
environment:
- LOAD_EX=n
- EXECUTOR=Local
logging:
options:
max-size: 10m
max-file: "3"
volumes:
- ./dags:/usr/local/airflow/dags
# - ./plugins:/usr/local/airflow/plugins
ports:
- "8080:8080"
command: webserver
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
redis:
image: redis
Compose Airflow container:
> cd C:\docker-airflow-master
> docker-compose -f docker-compose-LocalExecutor.yml up -d
Container docker-airflow-master-redis-1 Created
Container docker-airflow-master-postgres-1 Created
Container docker-airflow-master-webserver-1 Running
Container docker-airflow-master-redis-1 Starting
Container docker-airflow-master-postgres-1 Starting
Container docker-airflow-master-redis-1 Started
Container docker-airflow-master-postgres-1 Started
Check which containers are up and running:
> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
74ac4cd4fafb puckel/docker-airflow:1.10.9 "/entrypoint.sh webs…" 2 days ago Up 40 minutes (healthy) 5555/tcp, 8793/tcp, 0.0.0.0:8080->8080/tcp docker-airflow-master-webserver-1
1acef40c382a postgres:9.6 "docker-entrypoint.s…" 2 days ago Up 3 minutes 5432/tcp docker-airflow-master-postgres-1
e7adfadd1c38 redis "docker-entrypoint.s…" 2 days ago Up 3
minutes 6379/tcp docker-airflow-master-redis-1
Check network connections:
> netstat
Proto Local Address Foreign Address State
TCP [::1]:8080 LAPTOP-0FSNTPS1:63790 TIME_WAIT
TCP [::1]:8080 LAPTOP-0FSNTPS1:63791 TIME_WAIT
TCP [::1]:8080 LAPTOP-0FSNTPS1:63792 TIME_WAIT
Open browser on address localhost:8080:
What could be wrong that it doesn't work?
Have you tried with the latest official docker compose file? It worked fine for me.

Docker service container, error : Service 'w3svc' has been stopped

I'm trying to create multiple containers using "Docker swarm" on Windows Server 2016 my service has been created and replicated but it's not stable it's running with an error.
PS C:\Users\tmman\Desktop\stackdeploy> docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
xw6kqqu7o4ad demo_db replicated 1/1 microsoft/mssql-server-windows-express:latest
kkrpxwiytax9 demo_web replicated 1/1 microsoft/iis:latest *:80->80/tcp
PS C:\Users\tmman\Desktop\stackdeploy> docker service ps demo_web demo_db
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
1s4ybqny71sd demo_web.1 microsoft/iis:latest DELEI4127 Running Starting 2 seconds ago
uohf736ux1ne \_ demo_web.1 microsoft/iis:latest DELEI4127 Shutdown Failed 7 seconds ago "task: non-zero exit (21479438…"
owpguwtbpdxc \_ demo_web.1 microsoft/iis:latest DELEI4127 Shutdown Failed 16 seconds ago "starting container failed: co…"
dg54mihkflbx \_ demo_web.1 microsoft/iis:latest DELEI4127 Shutdown Failed 25 seconds ago "task: non-zero exit (21475000…"
7enznbiqjfp5 \_ demo_web.1 microsoft/iis:latest DELEI4127 Shutdown Failed 37 seconds ago "starting container failed: co…"
o541pdex9s3p demo_db.1 microsoft/mssql-server-windows-express:latest DELEI4127 Running Running 11 minutes ago
PS C:\Users\tmman\Desktop\stackdeploy> docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
017afe0a6211 microsoft/iis:latest "C:\\ServiceMonitor.e…" 18 seconds ago Up 10 seconds 80/tcp demo_web.1.1s4ybqny71sds3i9h47i59g4s
5889ac4ef8d2 microsoft/iis:latest "C:\\ServiceMonitor.e…" 27 seconds ago Exited (2147943855) 19 seconds ago demo_web.1.uohf736ux1neaz5u0p1d73jx4
dce80549e789 microsoft/iis:latest "C:\\ServiceMonitor.e…" 37 seconds ago Created 80/tcp demo_web.1.owpguwtbpdxc50em7a3rc8m05
92721722311c microsoft/iis:latest "C:\\ServiceMonitor.e…" 48 seconds ago Exited (2147500037) 38 seconds ago demo_web.1.dg54mihkflbxt2j0wd6tv8qlt
166d29256771 microsoft/iis:latest "C:\\ServiceMonitor.e…" 11 minutes ago Created 80/tcp demo_web.1.7enznbiqjfp5hdvjbgvnj1q1v
fbc3deb1930e microsoft/mssql-server-windows-express:latest "powershell -Command…" 11 minutes ago Up 11 minutes demo_db.1.o541pdex9s3pmaaty8xzkezpx
Error:
PS C:\Users\tmman\Desktop\stackdeploy> docker service logs demo_web
demo_web.1.1vwqd9xgvfd3#DELEI4127 |
demo_web.1.1vwqd9xgvfd3#DELEI4127 | Service 'w3svc' has been stopped
demo_web.1.1vwqd9xgvfd3#DELEI4127 |
demo_web.1.8vs509jzpwb9#DELEI4127 |
demo_web.1.8vs509jzpwb9#DELEI4127 | Service 'w3svc' has been stopped
demo_web.1.8vs509jzpwb9#DELEI4127 |
demo_web.1.8vs509jzpwb9#DELEI4127 | Failed to update IIS configuration
demo_web.1.1vwqd9xgvfd3#DELEI4127 | Failed to update IIS configuration
demo_web.1.z7yhqf1wqqiu#DELEI4127 |
demo_web.1.z7yhqf1wqqiu#DELEI4127 | Service 'w3svc' has been stopped
demo_web.1.z7yhqf1wqqiu#DELEI4127 |
demo_web.1.pt4du3jr20nj#DELEI4127 |
demo_web.1.pt4du3jr20nj#DELEI4127 | Service 'w3svc' has been stopped
demo_web.1.pt4du3jr20nj#DELEI4127 |
demo_web.1.z7yhqf1wqqiu#DELEI4127 | Failed to update IIS configuration
demo_web.1.pt4du3jr20nj#DELEI4127 | Failed to update IIS configuration
PS C:\Users\tmman\Desktop\stackdeploy> docker info
Containers: 6
Running: 2
Paused: 0
Stopped: 4
Images: 3
Server Version: 18.09.2
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics l2bridge l2tunnel nat null overlay transparent
Log: awslogs etwlogs fluentd gelf json-file local logentries splunk syslog
Swarm: active
NodeID: 1oef3sisa3el3q46tz7aj78eu
Is Manager: true
ClusterID: k4l6x9b42bg7bfnf630g3g2h1
Managers: 1
Nodes: 1
Default Address Pool: 10.0.0.0/8
SubnetSize: 24
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 10.49.2.50
Manager Addresses:
10.49.2.50:2377
Default Isolation: process
Kernel Version: 10.0 14393 (14393.2848.amd64fre.rs1_release.190305-1856)
Operating System: Windows Server 2016 Standard Version 1607 (OS Build 14393.2848)
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 7.999GiB
Name: DELEI4127
ID: 5BCA:25XO:U3TH:JYXD:BULV:MWXO:UWYF:APIZ:AVCF:R2QO:6KFL:A5SE
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
my Dockerfile :
FROM microsoft/iis:nanoserver
WORKDIR /inetpub/wwwroot
RUN powershell -Command `
Add-WindowsFeature Web-Server;
Invoke-WebRequest -UseBasicParsing -Uri "https://dotnetbinaries.blob.core.windows.net/servicemonitor/2.0.1.6/ServiceMonitor.exe" -OutFile "C:\ServiceMonitor.exe"
EXPOSE 80
ENTRYPOINT ["C:\\ServiceMonitor.exe", "w3svc"]
COPY index.html /index.html
my YML.file:
version: "3"
services:
db:
image: microsoft/mssql-server-windows-express
networks:
- cpxnet
deploy:
environment:
- SA_PASSWORD=Abcd1234
- ACCEPT_EULA=Y
web:
image: microsoft/iis:latest
networks:
- cpxnet
deploy:
resources:
limits:
memory: 50M
ports:
- "80:80"
depends_on:
- db
networks:
cpxnet:
I got some solutions from this website: https://github.com/Microsoft/aspnet-docker/issues/64 but didn't help with my error
Thank you in advance for your help!!
Note!!!: i'm a beginner
I faced similar issue n had almost similar dockerfile.
To troubleshoot I changed the entrypoint to continuous ping to local host. So that I could login to container n check the issue with w3svc.
I found strange multiple events in event viewer (need to view in powershell) that w3svc is started successfully. There were no stop event. But I concluded that something wrong with my service.
I further checked n found that app pool is in "OnDemand" state instead of "always running". I set the apppool property to always running in my dockerfile. Post that switched entrypoint to original value "service monitor.exe w3svc" n it made my container stable.
Note - I m not using default iis image where service monitor already set as entrypoint.

How do I deploy a Docker app without publishing it?

How do I deploy a Docker app without publishing it to their hub? I don't want to create a username and password on their service (they just want to trap flies in their ecosystem), and I don't think I will use the swarm part of Docker. Besides that, it sounds very insecure to publish your closed-source code on a public repository! However I want to see how it works and want to learn the stack part, which depends on the swarm part. I followed their tutorial, but the app only deployed on the local default master node.
https://docs.docker.com/get-started/part4/#deploy-the-app-on-the-swarm-manager
docker-composer.yml
...
# replace username/repo:tag with your name and image details
image: friendlyhello
3 machines/nodes with 1 master node
C:\Temp\docker-tutorial>docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default * virtualbox Running tcp://192.168.99.100:2376 v18.03.1-ce
myvm1 - virtualbox Running tcp://192.168.99.101:2376 v18.03.1-ce
myvm2 - virtualbox Running tcp://192.168.99.102:2376 v18.03.1-ce
The app is deployed with 6 instances.
C:\Temp\docker-tutorial>docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
uvsxf1q7brhb getstartedlab_web replicated 6/6 friendlyhello:latest *:80->80/tcp
However the app only fell onto the default master node and none of the swarm nodes.
C:\Temp\docker-tutorial>docker service ps getstartedlab_web
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR
PORTS
6jh1ua0wjyzi getstartedlab_web.1 friendlyhello:latest default Running Running about an hour ago
to14hu7g3rhz \_ getstartedlab_web.1 friendlyhello:latest myvm1 Shutdown Rejected about an hour ago "No such image: friendlyhello:"
ek91tcdj61nv \_ getstartedlab_web.1 friendlyhello:latest myvm1 Shutdown Rejected about an hour ago "No such image: friendlyhello:"
jwdvuf89a640 \_ getstartedlab_web.1 friendlyhello:latest myvm2 Shutdown Rejected about an hour ago "No such image: friendlyhello:"
xrp0rim67ipi getstartedlab_web.2 friendlyhello:latest default Running Running about an hour ago
tp008eoj2mpk getstartedlab_web.3 friendlyhello:latest default Running Running about an hour ago
w6wyk3nj53zv \_ getstartedlab_web.3 friendlyhello:latest myvm2 Shutdown Rejected about an hour ago "No such image: friendlyhello:"
7ts6aqianz7l \_ getstartedlab_web.3 friendlyhello:latest myvm1 Shutdown Rejected about an hour ago "No such image: friendlyhello:"
gjt1qks57rud \_ getstartedlab_web.3 friendlyhello:latest myvm1 Shutdown Rejected about an hour ago "No such image: friendlyhello:"
o05u4qwt12vq getstartedlab_web.4 friendlyhello:latest default Running Running about an hour ago
ifzmmy8ru443 \_ getstartedlab_web.4 friendlyhello:latest myvm1 Shutdown Rejected about an hour ago "No such image: friendlyhello:"
jnxn8gs3bte3 \_ getstartedlab_web.4 friendlyhello:latest myvm2 Shutdown Rejected about an hour ago "No such image: friendlyhello:"
xsooht9gpf01 \_ getstartedlab_web.4 friendlyhello:latest myvm2 Shutdown Rejected about an hour ago "No such image: friendlyhello:"
v23mjl8n3yyd getstartedlab_web.5 friendlyhello:latest default Running Running about an hour ago
meocennltdph getstartedlab_web.6 friendlyhello:latest default Running Running about an hour ago
3t78bpswwuyw \_ getstartedlab_web.6 friendlyhello:latest myvm2 Shutdown Rejected about an hour ago "No such image: friendlyhello:"
y3ih3md932qo \_ getstartedlab_web.6 friendlyhello:latest myvm2 Shutdown Rejected about an hour ago "No such image: friendlyhello:"
sqsngkq1440a \_ getstartedlab_web.6 friendlyhello:latest myvm1 Shutdown Rejected about an hour ago "No such image: friendlyhello:"
Docker version 18.03.0-ce, build 0520e24302, Windows 8.1
I tried to follow
https://github.com/docker/docker-registry/blob/master/README.md#quick-start
https://docs.docker.com/registry/#basic-commands
https://blog.docker.com/2013/07/how-to-use-your-own-registry/
I set this line in docker-compose.yml
image: 192.168.99.100:5000/get-started:part2
But after I ran docker stack deploy it still failed!
C:\Temp\docker-tutorial>docker stack deploy -c docker-compose.yml getstartedlab
Creating network getstartedlab_webnet
Creating service getstartedlab_web
C:\Temp\docker-tutorial>docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
jjr7cuqy2i54 getstartedlab_web replicated 0/6 192.168.99.100:5000/get-started:part2 *:80->80/tcp
C:\Temp\docker-tutorial>docker service ps getstartedlab_web
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR
PORTS
bsx3slkj8pbr getstartedlab_web.1 192.168.99.100:5000/get-started:part2 myvm1 Ready Rejected 3 seconds ago "No such image: 192.168.99.100"
cusqg0p35cwp \_ getstartedlab_web.1 192.168.99.100:5000/get-started:part2 default Shutdown Rejected 8 seconds ago "No such image: 192.168.99.100"
...
The image is in 'localhost' but not 192.168.99.100.
C:\Temp\docker-tutorial>docker pull localhost:5000/get-started:part2
part2: Pulling from get-started
Digest: sha256:fedc2e7c01a45dab371cf4e01b7f8854482b33564c52d2c725f52f787f91dbcb
Status: Image is up to date for localhost:5000/get-started:part2
C:\Temp\docker-tutorial>docker pull 192.168.99.100:5000/get-started:part2
Error response from daemon: Get https://192.168.99.100:5000/v2/: http: server gave HTTP response to HTTPS client
localhost:5000 refuses to connect in the browser. I also tried localhost:5000/get-started:part2 as the image name, but that also failed.
You can host your own docker container registry or use private container registries from many cloud-providers with your custom auth. Few options:
AWS ECR / Amazon Elastic Container Registry: https://aws.amazon.com/ecr/
Azure Container Registry: https://azure.microsoft.com/en-us/services/container-registry/
Codefresh private docker registries: https://codefresh.io/
Artifactory: https://www.jfrog.com/confluence/display/RTF/Docker+Registry
If you want to have complete control, you can alternatively host your own Docker Registry as well:
https://github.com/docker/docker-registry/blob/master/README.md
https://blog.docker.com/2013/07/how-to-use-your-own-registry/
Once you setup your registry you can just simply authenticate with docker login and then manage your images with docker push/pull as usual.

creation of container using docker-compose deletes another container that is already running

I am trying to start 2 separate containers using the docker-compose command based on 2 different images.
One image (work) is based on code worked on in "development". A second image (cons) image is created by code that is currently at the "consolidation" level.
When starting the first container, all seems to go OK.
Details of above image are here:
WORK DIRECTORY: ~/apps/django.work/extraction/docker-compose.yml
version: '3'
services:
db:
image: postgres
container_name: postgres-work
web:
build: .
image: apostx-cc-backoffice-work
container_name: cc-backoffice-work
command: python3 backendworkproj/manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "7350:8000"
depends_on:
- db
EXECUTION:~/apps/django.work./extraction$ docker-compose up --no-deps -d web
Creating network "extraction_default" with the default driver
Creating cc-backoffice-work ...
Creating cc-backoffice-work ... done
EXECUTION:~/apps/django.work/extraction$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
39185f36941a apostx-cc-backoffice-work "python3 backendwo..." 8 seconds ago Up 7 seconds 0.0.0.0:7350->8000/tcp cc-backoffice-work
dede5cb1966a jarkt/docker-remote-api "/bin/sh -c 'socat..." 2 days ago Up 2 days 0.0.0.0:3080->2375/tcp dock_user_display_remote
But, when I work with the second directory to compile and start a different image, some strange things start to happen:
Again, more details are below:
CONS DIRECTORY: ~/apps/django.cons/extraction/docker-compose.yml
version: '3'
services:
db:
image: postgres
container_name: postgres-cons
web:
build: .
image: apostx-cc-backoffice-cons
container_name: cc-backoffice-cons
command: python3 backendworkproj/manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "7450:8000"
depends_on:
- db
EXECUTION:~/apps/django.cons/extraction$ docker-compose up --no-deps -d web
Recreating cc-backoffice-work ...
Recreating cc-backoffice-work
Recreating cc-backoffice-work ... done
EXECUTION:~/apps/django.cons/extraction$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f942f84e567a apostx-cc-backoffice-cons "python3 backendwo..." 7 seconds ago Up 6 seconds 0.0.0.0:7450->8000/tcp cc-backoffice-cons
dede5cb1966a jarkt/docker-remote-api "/bin/sh -c 'socat..." 2 days ago Up 2 days 0.0.0.0:3080->2375/tcp dock_user_display_remote
Question
Why is the first container being supplanted when I start the second one? If it is due to some kind of caching issue, how can one re-initialize/clean/clear out the cache before running docker-compose for a second time? Am I missing something here?
TIA
Update - I did the following:
got rid of old containers by using "docker container rm -f "
-
started the "work" (i.e. development) container
execute:~/apps/django.work.ccbo.thecontractors.club/extraction$ docker-compose --verbose up --no-deps -d web >& the_results_are_here
execute:~/apps/django.work.ccbo.thecontractors.club/extraction$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
61d2e9ccbc28 apostx-cc-backoffice-work "python3 backendwo..." 4 seconds ago Up 4 seconds 0.0.0.0:7350->8000/tcp work-cc-backoffice
dede5cb1966a jarkt/docker-remote-api "/bin/sh -c 'socat..." 3 days ago Up 3 days 0.0.0.0:3080->2375/tcp dock_user_display_remote
9b4b8b462fcb wmaker-test-officework "catalina.sh run" 11 days ago Up 11 days 0.0.0.0:7700->8080/tcp testBackOfficeWork.2017.10.30.04.20.01
ad5fd0592a07 wmaker-locl-officework "catalina.sh run" 11 days ago Up 11 days 0.0.0.0:7500->8080/tcp loclBackOfficeWork.2017.10.30.04.20.01
7bc9d7f94828 wmaker-cons-officework "catalina.sh run" 11 days ago Up 11 days 0.0.0.0:7600->8080/tcp consBackOfficeWork.2017.10.30.04.20.01
seeing that it looks OK, started the container for "cons" (consolidation)
execute:~/apps/django.cons.ccbo.thecontractors.club/extraction$ docker-compose --verbose up --no-deps -d web >& the_results_are_here
execute:~/apps/django.cons.ccbo.thecontractors.club/extraction$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0fb24fc45877 apostx-cc-backoffice-cons "python backendwor..." 5 seconds ago Up 4 seconds 0.0.0.0:7450->8010/tcp cons-cc-backoffices
dede5cb1966a jarkt/docker-remote-api "/bin/sh -c 'socat..." 3 days ago Up 3 days 0.0.0.0:3080->2375/tcp dock_user_display_remote
9b4b8b462fcb wmaker-test-officework "catalina.sh run" 11 days ago Up 11 days 0.0.0.0:7700->8080/tcp testBackOfficeWork.2017.10.30.04.20.01
ad5fd0592a07 wmaker-locl-officework "catalina.sh run" 11 days ago Up 11 days 0.0.0.0:7500->8080/tcp loclBackOfficeWork.2017.10.30.04.20.01
7bc9d7f94828 wmaker-cons-officework "catalina.sh run" 11 days ago Up 11 days 0.0.0.0:7600->8080/tcp consBackOfficeWork.2017.10.30.04.20.01
Again, the name: work-cc-backoffice has been supplanted by name: cons-cc-backoffices - work-cc-backoffice is totally gone now.
-
Looked at the file the_results_are_here (in the second run) to see if anything can be found
[... snip ...]
compose.cli.command.get_client: docker-compose version 1.17.1, build 6d101fb
docker-py version: 2.5.1
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t 3 May 2016
compose.cli.command.get_client: Docker base_url: http+docker://localunixsocket
compose.cli.command.get_client: Docker version: KernelVersion=4.4.0-72-generic, Arch=amd64, BuildTime=2017-09-26T22:40:56.000000000+00:00, ApiVersion=1.32, Version=17.09.0-ce, MinAPIVersion=1.12, GitCommit=afdb6d4, Os=linux, GoVersion=go1.8.3
compose.cli.verbose_proxy.proxy_callable: docker info <- ()
compose.cli.verbose_proxy.proxy_callable: docker info -> {u'Architecture': u'x86_64',
[... snip ...]
compose.cli.verbose_proxy.proxy_callable: docker inspect_network <- (u'extraction_default')
compose.cli.verbose_proxy.proxy_callable: docker inspect_network -> {u'Attachable': True,
u'ConfigFrom': {u'Network': u''},
u'ConfigOnly': False,
u'Containers': {u'61d2e9ccbc28bb2aba918dc24b5f19a3f68a06b9502ec1b98e83dd947d75d1be': {u'EndpointID': u'e19696ccf258a6cdcfcce41d91d5b3ebcb5fffbce4257e3480ced48a3d7dcc5c',
u'IPv4Address': u'172.20.0.2/16',
u'IPv6Address': u'',
u'MacAddress': u'02:42:ac:14:00:02',
u'Name': u'work-cc-backoffice'}},
u'Created': u'2017-11-10T09:56:22.709914332Z',
u'Driver': u'bridge',
...
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=False, filters={u'label': [u'com.docker.compose.project=extraction', u'com.docker.compose.oneoff=False']})
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 1 items)
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- (u'61d2e9ccbc28bb2aba918dc24b5f19a3f68a06b9502ec1b98e83dd947d75d1be')
compose.cli.verbose_proxy.proxy_callable: docker inspect_container -> {u'AppArmorProfile': u'docker-default',
u'Args': [u'backendworkproj/manage.py', u'runserver', u'0.0.0.0:8000'],
u'Config': {u'AttachStderr': False,
u'AttachStdin': False,
u'AttachStdout': False,
u'Cmd': [u'python3',
u'backendworkproj/manage.py',
u'runserver',
u'0.0.0.0:8000'],
u'Domainname': u'',
...
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={u'label': [u'com.docker.compose.project=extraction', u'com.docker.compose.service=web', u'com.docker.compose.oneoff=False']})
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 1 items)
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- (u'61d2e9ccbc28bb2aba918dc24b5f19a3f68a06b9502ec1b98e83dd947d75d1be')
compose.cli.verbose_proxy.proxy_callable: docker inspect_container -> {u'AppArmorProfile': u'docker-default',
To me, it looks like the program is trying to do some initialization
by looking for a container that is already up and running(?) See pic.
below. How can one change this behavior
Answer from #mikeyjk resolved the issue.
No worries. I wonder if you give each service a unique name, re run
composer build, whether the issue still occurs. I'll try and replicate
it today if no-one can work it out

Drone 0.8: build stuck in pending state

Installed Drone 0.8 on virtual machine with the following Docker Compose file:
version: '2'
services:
drone-server:
image: drone/drone:0.8
ports:
- 8080:8000
- 9000:9000
volumes:
- /var/lib/drone:/var/lib/drone/
restart: always
environment:
- DATABASE_DRIVER=sqlite3
- DATABASE_CONFIG=/var/lib/drone/drone.sqlite
- DRONE_OPEN=true
- DRONE_ORGS=my-github-org
- DRONE_ADMIN=my-github-user
- DRONE_HOST=${DRONE_HOST}
- DRONE_GITHUB=true
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT}
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET}
- DRONE_SECRET=${DRONE_SECRET}
- GIN_MODE=release
drone-agent:
image: drone/agent:0.8
restart: always
depends_on: [ drone-server ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_SERVER=drone-server:9000
- DRONE_SECRET=${DRONE_SECRET}
All variable values are stored in .env file and are correctly passed to running containers. Trying to run a build using private Github repository. When pushing to repository for the first time build starts and fails with the following error (i.e. build fails):
Then after clicking on Restart button seeing another screen (i.e. build is pending):
Having the following containers running on the same machine:
root#ci:~# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
94e6a266e09d drone/agent:0.8 "/bin/drone-agent" 2 hours ago Up 2 hours root_drone-agent_1
7c7d9f93a532 drone/drone:0.8 "/bin/drone-server" 2 hours ago Up 2 hours 80/tcp, 443/tcp, 0.0.0.0:9000->9000/tcp, 0.0.0.0:8080->8000/tcp root_drone-server_1
Even with DRONE_DEBUG=true the only log entry in agent log is:
2017/09/10 15:11:54 pipeline: request next execution
So I think for some reason my agent does not get the build from the queue. I noticed that latest Drone versions are using GRPC instead of WebSockets.
So how to get the build started? What I am missing here?
The reason of the issue - wrong .drone.yml file. Only the first red screen should be shown in that case. Showing pending and Restart button for incorrect YAML is a Drone issue.

Resources