docker; invalid reference format - docker

I tried to create a mongo-express container using the command below:
docker run -d \
-p 8081:8081 \
-e ME_CONFIG_MONGODB_ADMINUSERNAME =mongoadmin \
-e ME_CONFIG_MONGODB_ADMINPASSWORD =secret \
--net mongo-network \
--name mongo-express \
-e ME_CONFIG_MONGODB_SERVER =mongodb \
mongo-express
And got the error:
docker: invalid reference format.

Related

docker: invalid reference format: repository name must be lowercase

docker run -d \
-p 8081:8081 \
-e ME_CONFIG_MONGODB_ADMINUSERNAME-admin \
-e ME_CONFIG_ MONGODB_ADMINPASSWORD=password \
--net mongo-network \
--name mongo-express \
-e ME_CONFIG_MONGODE_SERVER-mongodb \
mongo-express
im facing
docker: invalid reference format: repository name must be lowercase.
Please help as i double checked capitl letters.
i tried other stack flow answers but still facing this error.

installing transmission on debian with docker: Missing container [duplicate]

This question already has answers here:
Why docker container exits immediately
(16 answers)
Closed 9 months ago.
I am new to this. I have installed docker on my Raspi. I am trying to install transmission on the docker. I use the following;
docker run --cap-add=NET_ADMIN -d \
--name=transmission \
-v /mnt/extDrive1:/data \
-v /etc/localtime:/etc/localtime:ro \
-e CREATE_TUN_DEVICE=true \
-e OPENVPN_PROVIDER=EXPRESSVPN \
-e OPENVPN_CONFIG=my_expressvpn_uk_-_london_udp \
-e OPENVPN_USERNAME=XXX\
-e OPENVPN_PASSWORD=XXX \
-e WEBPROXY_ENABLED=false \
-e LOCAL_NETWORK=192.168.0.0 \
--log-driver json-file \
--log-opt max-size=10m \
-p 9091:9091 \
haugene/transmission-openvpn
I go through the debug on https://haugene.github.io/docker-transmission-openvpn/debug/
All is fine until I get to the section 'Checking if Transmission is running'.
When I run docker ps, there are no containers in the list.
What have I done wrong? Ultimately, I am trying to access transmission through localhost:9091.
Edit: So I have made some progress, but still having issues;
docker start transmission temporarily. populates the container ID
docker exec -it <container-id> bash comes up with the following error:
Error response from daemon: Container XXXX is not running
It seems that container is exiting out as you are not running it in the detached mode. Try this:
docker run -itd --cap-add=NET_ADMIN -d \
--name=transmission \
-v /mnt/extDrive1:/data \
-v /etc/localtime:/etc/localtime:ro \
-e CREATE_TUN_DEVICE=true \
-e OPENVPN_PROVIDER=EXPRESSVPN \
-e OPENVPN_CONFIG=my_expressvpn_uk_-_london_udp \
-e OPENVPN_USERNAME=XXX\
-e OPENVPN_PASSWORD=XXX \
-e WEBPROXY_ENABLED=false \
-e LOCAL_NETWORK=192.168.0.0 \
--log-driver json-file \
--log-opt max-size=10m \
-p 9091:9091 \
haugene/transmission-openvpn

What I have missed when I linked the tor container to microblog?

So from begin I was trying to link the microblog from here by using next commands:
sudo docker build -t microblog:latest .
sudo docker run --name mysql -d -e MYSQL_RANDOM_ROOT_PASSWORD=yes \
-e MYSQL_DATABASE=microblog -e MYSQL_USER=microblog \
-e MYSQL_PASSWORD=onion~12 \
mysql/mysql-server:5.7
sudo docker run --name elasticsearch -d -p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" \
docker.elastic.co/elasticsearch/elasticsearch-oss:7.6.2
sudo docker run --name microblog -d -p 8000:5000 -e SECRET_KEY=my-secret-key \
-e MAIL_SERVER=smtp.googlemail.com -e MAIL_PORT=587 -e MAIL_USE_TLS=true \
-e MAIL_USERNAME=admin_onion123#gmail.com -e MAIL_PASSWORD=123456780 \
--link mysql:dbserver \
-e DATABASE_URL=mysql+pymysql://microblog:onion~12#dbserver/microblog \
--link elasticsearch:elasticsearch \
-e ELASTICSEARCH_URL=http://elasticsearch:9200 \
microblog:latest
Up here everything is perfect!
Now I was getting the docker container with Tor Hidden-Service from here by using next command:
sudo docker run -itd --link microblog goldy/tor-hidden-service
The ideea is when I am using the command :
sudo docker logs {container of tor}
is showing me the myrandomoninonaddress.onoin:5000.
What I did wrong or what I have missed and why is listening port 5000 instead of 8000?

"docker: invalid reference format" while trying to install external plugin

My goal is simple: Load a hello-world external plugin for Kong. I've decided to do this via mounted volume, but am running into significant problems that stop me from being able to run my simple hello-world external plugin.
I've isolated my problem down to the following commands, from scratch:
docker network create kong-net
docker run -d --name kong-database \
--network=kong-net \
-p 5432:5432 \
-e "POSTGRES_USER=kong" \
-e "POSTGRES_DB=kong" \
-e "POSTGRES_PASSWORD=kong" \
postgres:9.6
docker run --rm \
--network=kong-net \
-e "KONG_DATABASE=postgres" \
-e "KONG_PG_HOST=kong-database" \
-e "KONG_PG_PASSWORD=kong" \
-e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" \
kong:latest kong migrations bootstrap
docker run -it --name kong \
--network=kong-net \
-e "KONG_DATABASE=postgres" \
-e "KONG_PG_HOST=kong-database" \
-e "KONG_PG_PASSWORD=kong" \
-e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" \
-e "KONG_LUA_PACKAGE_PATH=/plugins/?.lua" \
-e "KONG_CUSTOM_PLUGINS=helloworld" \
-e "KONG_PROXY_ACCESS_LOG=/dev/stdout" \
-e "KONG_ADMIN_ACCESS_LOG=/dev/stdout" \
-e "KONG_PROXY_ERROR_LOG=/dev/stderr" \
-e "KONG_ADMIN_ERROR_LOG=/dev/stderr" \
-e "KONG_ADMIN_LISTEN=0.0.0.0:8001, 0.0.0.0:8444 ssl" \
-v "kong/plugins/helloworld:/plugins" \
-p 8000:8000 \
-p 8443:8443 \
-p 8001:8001 \
-p 8444:8444 \
kong:latest
In my local directory, I have the plugin source code sitting in ./kong/plugins/helloworld/
According to the Kong docs, I'm adjusting my Kong config file by adding "KONG_" prior to the item I want adjusted. This means I have KONG_CUMSTOM_PLUGINS=helloworld and KONG_LUA_PACKAGE_PATH=/plugins/?.lua
Docker and Kong doesn't like this, and when running the above commands I am greeted with the following:
docker: invalid reference format.
See 'docker run --help'.
Eliminating things one-by-one, the problem surrounds both the -e "KONG_CUSTON_PLUGINS=helloworld" and -e "KONG_LUA_PACKAGE_PATH=/plugins/?.lua" \ bits.
What's going wrong here?

Run Jenkins on different port on a docker container

I'm trying to run Jenkins on docker by using a different port. By default Jenkins is running on port 8080, but this port is used by different service in my machine. I would like to run Jenkins on a different port.
I have used the following command without any success:
docker run \
-u root \
--rm \
-d \
--name jenkins \
-p 8081:8081 \
-p 50000:50000 \
--env JAVA_OPTS="--httpPort=8081" \
-v jenkins-data:/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \
jenkinsci/blueocean
Any ideas?
--env JAVA_OPTS="--httpPort=8081" \
not JAVA_OPTS, change it like this:
-e JENKINS_OPTS="--httpPort=8081"
Use this:
docker run \
-u root \
--rm \
-d \
--name jenkins \
-p 8081:8080 \
-p 50000:50000 \
-v jenkins-data:/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \
jenkinsci/blueocean

Resources