Selenium not found error for docker project - docker

I get module not found error for selinium. I installed with pip install selinium. Selenium located in : /home/admin/.local/lib/python3.8/site-packages
sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7f9aa3db selenium/standalone-firefox "/opt/bin/entry_poin…" 12 hours ago Up 17 minutes 0.0.0.0:4444->4444/tcp, :::4444->4444/tcp, 5900/tcp youtubeuploader_firefox_1
f2eb99409 hello-world "/hello" 14 hours ago Exited (0) 14 hours ago interesting_heisenberg
ls /opt/bin returns no file or directory

Related

Where are the application containers of Spring Cloud Data Flow in a docker compose deployment?

I followed the Spring Cloud Dataflow docs at https://dataflow.spring.io/docs/installation/local/docker/ and deployed everything using docker-compose.
Everything went fine and I can see the example stream working.
One thing I don't understand: After deploying the stream I expected to see a container for every application if i do a docker ps, but that is not the case. If the applications are not deployed as individual containers how are they executed?
Output of docker ps:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
40bb0007bfd0 springcloud/spring-cloud-dataflow-server:2.9.1 "bin/sh -c '\n apt-…" 3 hours ago Up 3 hours 0.0.0.0:9393->9393/tcp dataflow-server
450a11a2b25c springcloud/spring-cloud-skipper-server:2.8.1 "bin/sh -c '\n apt-…" 3 hours ago Up 3 hours 0.0.0.0:7577->7577/tcp, 0.0.0.0:20000-20195->20000-20195/tcp skipper
e0773f0f9d33 confluentinc/cp-kafka:5.5.2 "/etc/confluent/dock…" 3 hours ago Up 3 hours 9092/tcp dataflow-kafka
2d1aeb3435e2 mysql:5.7.25 "docker-entrypoint.s…" 3 hours ago Up 3 hours 3306/tcp, 33060/tcp dataflow-mysql
cd3658fc93a4 confluentinc/cp-zookeeper:5.5.2 "/etc/confluent/dock…" 3 hours ago Up 3 hours 2181/tcp, 2888/tcp, 3888/tcp dataflow-kafka-zookeeper
Thank's to #jonrsharpe I found the processes inside skipper:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
40bb0007bfd0 springcloud/spring-cloud-dataflow-server:2.9.1 "bin/sh -c '\n apt-…" 3 hours ago Up 3 hours 0.0.0.0:9393->9393/tcp dataflow-server
450a11a2b25c springcloud/spring-cloud-skipper-server:2.8.1 "bin/sh -c '\n apt-…" 3 hours ago Up 3 hours 0.0.0.0:7577->7577/tcp, 0.0.0.0:20000-20195->20000-20195/tcp skipper
e0773f0f9d33 confluentinc/cp-kafka:5.5.2 "/etc/confluent/dock…" 3 hours ago Up 3 hours 9092/tcp dataflow-kafka
2d1aeb3435e2 mysql:5.7.25 "docker-entrypoint.s…" 3 hours ago Up 3 hours 3306/tcp, 33060/tcp dataflow-mysql
cd3658fc93a4 confluentinc/cp-zookeeper:5.5.2 "/etc/confluent/dock…" 3 hours ago Up 3 hours 2181/tcp, 2888/tcp, 3888/tcp dataflow-kafka-zookeeper
$ docker exec -it 450a11a2b25c /bin/bash
root#450a11a2b25c:/# ps -aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 4640 0 ? Ss 05:55 0:00 bin/sh -c apt-get update && apt-get install --no-install-recommends -y wget && wget --no-check-certificate -P /tmp/ https://raw.githubusercontent
root 209 0.8 16.3 1149340 332864 ? Sl 05:56 1:47 java org.springframework.boot.loader.JarLauncher
root 957 1.1 9.8 3106508 201096 ? Sl 08:57 0:24 /layers/paketo-buildpacks_bellsoft-liberica/jre/bin/java -jar /root/.m2/repository/io/spring/dataflow/sample/usage-detail-sender-kafka/0.0.1-SNAPSHOT/us
root 981 1.4 11.9 3100332 242944 ? Sl 08:57 0:31 /layers/paketo-buildpacks_bellsoft-liberica/jre/bin/java -jar /root/.m2/repository/io/spring/dataflow/sample/usage-cost-logger-kafka/0.0.1-SNAPSHOT/usag
root 1003 1.5 12.3 3101360 252020 ? Sl 08:57 0:34 /layers/paketo-buildpacks_bellsoft-liberica/jre/bin/java -jar /root/.m2/repository/io/spring/dataflow/sample/usage-cost-processor-kafka/0.0.1-SNAPSHOT/u
root 1104 1.0 0.1 18516 3244 pts/0 Ss 09:34 0:00 /bin/bash
root 1114 0.0 0.1 34416 2740 pts/0 R+ 09:34 0:00 ps -aux
root#450a11a2b25c:/#

Docker-compose error "failed to shutdown container"

I am trying docker-compose in windows container,getting below error -failed to shutdown container: container . Looking at the container status for id 3878f34c9213, it says exited...how to find why this container exited or how to resolve this error ?
Windows 10 machine
Docker version 19.03.8
> docker-compose up Building web
Step 1/5 : FROM python:3.7-alpine
3.7-alpine: Pulling from library/python
df20fa9351a1: Pull complete 36b3adc4ff6f: Pull complete d4f879c74e1d: Pull complete 6064e23ad526: Pull complete ff64a3b3d6f3: Pull complete Digest: sha256:3bb2acc9bd988159abe35442a208895de22b76ecdbf565c636edbf01551d9905
Status: Downloaded newer image for python:3.7-alpine
---> 6ca3e0b1ab69
Step 2/5 : ADD . /code
---> 977f90bbc7d0
Step 3/5 : WORKDIR /code
---> Running in 300fbdd6e6aa
Removing intermediate container 300fbdd6e6aa
---> 5e50e300e614
Step 4/5 : RUN pip install -r requirements.txt
---> Running in 3878f34c9213
Collecting flask
Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting redis
Downloading redis-3.5.3-py2.py3-none-any.whl (72 kB)
Collecting Jinja2>=2.10.1
Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting Werkzeug>=0.15
Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Collecting click>=5.1
Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting itsdangerous>=0.24
Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting MarkupSafe>=0.23
Downloading MarkupSafe-1.1.1.tar.gz (19 kB)
Building wheels for collected packages: MarkupSafe
Building wheel for MarkupSafe (setup.py): started
Building wheel for MarkupSafe (setup.py): finished with status 'done'
Created wheel for MarkupSafe: filename=MarkupSafe-1.1.1-py3-none-any.whl size=12629 sha256=b08bae4a80da844e9226dbae27c8fa16b6273a37a4d2cb97d34829132689bdb1
Stored in directory: /root/.cache/pip/wheels/b9/d9/ae/63bf9056b0a22b13ade9f6b9e08187c1bb71c47ef21a8c9924
Successfully built MarkupSafe
Installing collected packages: MarkupSafe, Jinja2, Werkzeug, click, itsdangerous, flask, redis
Successfully installed Jinja2-2.11.2 MarkupSafe-1.1.1 Werkzeug-1.0.1 click-7.1.2 flask-1.1.2 itsdangerous-1.1.0 redis-3.5.3
ERROR: Service 'web' failed to build: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 4294967295: failed to shutdown container: container 3878f34c9213071785a2bd0641a8490af52b5fb2607a6209c5014a33aef4ff29 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container 3878f34c9213071785a2bd0641a8490af52b5fb2607a6209c5014a33aef4ff29 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)
docker ps -a
--------------
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3878f34c9213 5e50e300e614 "/bin/sh -c 'pip ins…" 32 minutes ago Exited (4294967295) 32 minutes ago vibrant_rosalind
636cab556759 2f1fe904a562 "/bin/sh -c 'pip ins…" 39 minutes ago Exited (4294967295) 39 minutes ago silly_mclean
658dd0803e98 2f1fe904a562 "/bin/sh -c 'pip ins…" 2 hours ago Exited (4294967295) 2 hours ago bold_jackson
22bd52938931 ubuntu "/bin/bash" 13 hours ago Exited (4294967295) 13 hours ago hardcore_hertz
b56a2a9a8684 ubuntu "/bin/bash" 43 hours ago Exited (4294967295) 13 hours ago vigilant_napier
f7b70aba6f84 hello-world "cmd /C 'type C:\\hel…" 44 hours ago Exited (0) 44 hours ago brave_goldberg
When you switched to Linux containers it helped.
If you use Linux containers than you will see "Switch to Windows containers..." when you press RMB on Docker.
I had this error with docker, I uninstalled docker and installed it in another version, and it worked!

How to create docker images for Hyperledger Fabric

I made changes to fabric code and would like to test it by running using docker-compose. I run make peer; make docker. I see the following.
mkdir -p build/image/peer/payload
cp build/docker/bin/peer build/sampleconfig.tar.bz2 build/image/peer/payload
mkdir -p build/image/orderer/payload
cp build/docker/bin/orderer build/sampleconfig.tar.bz2 build/image/orderer/payload
mkdir -p build/image/testenv/payload
cp build/docker/bin/orderer build/docker/bin/peer build/sampleconfig.tar.bz2 images/testenv/install-softhsm2.sh build/image/testenv/payload
mkdir -p build/image/tools/payload
cp build/docker/bin/cryptogen build/docker/bin/configtxgen build/docker/bin/configtxlator build/docker/bin/peer build/sampleconfig.tar.bz2 build/image/tools/payload
When I do docker images, I still see the same bunch of images
hyperledger/fabric-orderer latest 391b202306fa 3 weeks ago 180MB
hyperledger/fabric-orderer x86_64-1.1.0 391b202306fa 3 weeks ago 180MB
hyperledger/fabric-peer latest e0f3bdb4506f 3 weeks ago 187MB
hyperledger/fabric-peer x86_64-1.1.0 e0f3bdb4506f 3 weeks ago 187MB
How do I go from there to generate new docker image? what am I missing?
I am using Ubuntu 16.04. Thanks for your time
cd build/image/peer/
docker build -t hyperledger/fabric-peer:x86_64-1.1.x .
Change the image name in docker-compose.yaml file and you are good to go.

Docker on W10 and Hyper-V "no Procfile path defined"

I am an Aldryn customer and have troubles to setup their docker environment with Windows 10 and Hyper-V.
Before I used Virtualbox and all was fine, but I could not use interactive shells.
So I really would like to make the switch to Hyper-V.
My docker version Client is: 1.12.0 and I use cmder as my terminal.
I run the aldryn project setup and then do
C:\Users\Hans\myproject [develop +1 ~1 -0 !]
λ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
973098beb1cb myproject_web "/tini -g -- start mi" 3 minutes ago Exited (1) 3 minutes ago myproject_web_run_1
e2f7faa6d8f8 postgres:9.4 "/docker-entrypoint.s" 3 minutes ago Up 3 minutes 5432/tcp myproject_db_1
-
C:\Users\Hans\myproject [develop +1 ~1 -0 !]
λ docker logs 973098beb1cb
no Procfile path defined <<-- this is the error message it's about
My project locally is at C:\Users\Hans\myproject
Then I check within the container:
C:\Users\Hans\myproject [develop +1 ~1 -0 !
λ docker run -i -t myproject_web /bin/bash
root#ed8410007425:/app# ls
Dockerfile addons-dev data.tar.gz gulpfile.js package.json requirements.txt static tools
Procfile bower.json docker-compose-windows.yml manage.py private settings.py static_collected urls.py
addons browserslist docker-compose.yml migrate.sh requirements.in settings.pyc templates wsgi.py
More info:
C:\Users\Hans\myproject [develop +1 ~1 -0 !]
λ docker-compose -f docker-compose-windows.yml up
myproject_db_1 is up-to-date
Starting myproject_web_1
Attaching to myproject_db_1, myproject_web_1
web_1 | python: can't open file 'manage.py': [Errno 2] No such file or directory
Aldryn does not have Windows experts, so they cannot support Windows users.
I hope there are fellow Windows users that might have solved this.
Where does this 'no Procfile path defined' come from?
Could it be a permission problem?
How do I debug this problem?

Docker Error when Starting an Image

I have the following Dockerfile that is supposed to start nginx server:
# Set the base image to Ubuntu
FROM ubuntu
# File Author / Maintainer
MAINTAINER myname "myemail#gemail.com"
# Install Nginx
# Add application repository URL to the default sources
# RUN echo "deb http://archive.ubuntu.com/ubuntu/ raring main universe" >> /etc/apt/sources.list
# Update the repository
RUN apt-get update
# Install necessary tools
RUN apt-get install -y nano wget dialog net-tools
# Download and Install Nginx
RUN apt-get install -y nginx
# Remove the default Nginx configuration file
RUN rm -v /etc/nginx/nginx.conf
# Copy a configuration file from the current directory
ADD nginx.conf /etc/nginx/
# Append "daemon off;" to the configuration file
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
# Expose ports
EXPOSE 80
# Set the default command to execute when creating a new container
CMD service nginx start
When I tried to start the image that I created using docker build, I get the following error:
my-MacBook-Pro:nginx-docker me$ docker run -it myname:nginx-latest
2016-07-15T12:57:00.525640076+02:00 container create 0220107a0060cf61ff7dcb601870086b4ae7a0b7cacd914d63719e9a3d0d9451 (image=myname:nginx-latest, name=sad_knuth)
2016-07-15T12:57:00.542025710+02:00 container attach 0220107a0060cf61ff7dcb601870086b4ae7a0b7cacd914d63719e9a3d0d9451 (image=myname:nginx-latest, name=sad_knuth)
2016-07-15T12:57:00.573835719+02:00 network connect 5e0b48e45380f1548ab524cfa7bfe94ae952ce740df76fda9e35561a258e31ef (container=0220107a0060cf61ff7dcb601870086b4ae7a0b7cacd914d63719e9a3d0d9451, name=bridge, type=bridge)
2016-07-15T12:57:00.654772110+02:00 container start 0220107a0060cf61ff7dcb601870086b4ae7a0b7cacd914d63719e9a3d0d9451 (image=myname:nginx-latest, name=sad_knuth)
2016-07-15T12:57:00.656973139+02:00 container resize 0220107a0060cf61ff7dcb601870086b4ae7a0b7cacd914d63719e9a3d0d9451 (height=42, image=myname:nginx-latest, name=sad_knuth, width=181)
* Starting nginx nginx [fail]
2016-07-15T12:57:00.715136152+02:00 container die 0220107a0060cf61ff7dcb601870086b4ae7a0b7cacd914d63719e9a3d0d9451 (exitCode=1, image=myname:nginx-latest, name=sad_knuth)
2016-07-15T12:57:00.757891577+02:00 network disconnect 5e0b48e45380f1548ab524cfa7bfe94ae952ce740df76fda9e35561a258e31ef (container=0220107a0060cf61ff7dcb601870086b4ae7a0b7cacd914d63719e9a3d0d9451, name=bridge, type=bridge)
my-MacBook-Pro:nginx-docker me$
EDIT:
I even tried the following as per the recommendations:
myname-MacBook-Pro:nginx-docker me$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0220107a0060 myname:nginx-latest "/bin/sh -c 'service " 8 minutes ago Exited (1) 8 minutes ago sad_knuth
7252213512f0 myname:nginx-latest "/bin/sh -c 'service " 23 minutes ago Exited (1) 23 minutes ago clever_jennings
53a5e6978978 myname:nginx-latest "/bin/sh -c 'service " 25 minutes ago Exited (1) 25 minutes ago gigantic_dubinsky
10fc9e4b749f myname:nginx-latest "/bin/sh -c 'service " 27 minutes ago Exited (1) 27 minutes ago distracted_almeida
64161feb2b2a 0d73419e8da9 "nginx -g 'daemon off" 3 hours ago Exited (1) 3 hours ago pensive_mcnulty
5c9eab4c7998 hello-world "/hello" 4 hours ago Exited (0) 4 hours ago sharp_kare
myname-MacBook-Pro:nginx-docker me$ docker container 0220107a0060
docker: 'container' is not a docker command.
See 'docker --help'.
myname-MacBook-Pro:nginx-docker me$ docker logs 0220107a0060
* Starting nginx nginx [fail]
CMD service nginx start means the main process exits immediatly after launching nginx.
You would need
CMD /usr/sbin/nginx -g "daemon off;"
To make sure it is not launched in daemon mode.
Other alternatives are here, but I prefer this one as it limits the number of processes to just nginx.

Resources