Docker invalid reference format? - docker

I try use this docker command
docker run --rm --name eosio -d -p 8888:8888 -p 9876:9876 \
-v \host_mntC\eosio\work:/work
-v \host_mntC\eosio\data:/mnt/dev/data \
-v \host_mntC\eosio\config:/mnt/dev/config \
\host_mntC\eosio\contracts:/contracts eosio/test /bin/bash \
-c "nodeos -e -p eosio --plugin eosio::producer_plugin \
--plugin eosio::history_plugin --plugin eosio::chain_api_plugin \
--plugin eosio::history_api_plugin --plugin eosio::http_plugin \
-d /mnt/dev/data --config-dir /mnt/dev/config \
--http-server-address=0.0.0.0:8888 --access-control-allow-origin=* \
--contracts-console --http-validate-host=false"
I need the files to be saved locally, when I start EOSIO. What I'm doing is wrong, thank you. System Windows 10.

It's just a missing -v before \host_mntC\eosio\contracts:/contracts.

Related

How to open a rviz, a qt application, in vscode-remote?

I am trying to run a ros project inside a vscode-remote container where the images would be running on the current machine.
It needs to be able to communicate to other nodes outside of the containers and able to use vizualisation tools like rviz which uses qt library.
I installed nvidia-docker2 and was able to start the image on it's own and start rviz.
However when running the command in vscode-remote, some parameters don't seem to work.
This is the command I used to run my image using cli:
docker run -it --rm \
--name noetic_desktop \
--hostname noetic_desktop \
--device /dev/snd \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
-v `pwd`/../Commands/bin:/home/user/bin \
-v `pwd`/../ExampleCode:/home/user/ExampleCode \
-v `pwd`/../Projects/catkin_ws_src:/home/user/Projects/catkin_ws/src \
-v `pwd`/../Data:/home/user/Data \
-env="XAUTHORITY=$XAUTH" \
--gpus all \
noetic_image:latest \
bash
And this is the config I am running for vscode-remote extension.
devcontainer.json :
{
"name": "Existing Dockerfile",
"context": "..",
"dockerFile": "../Dockerfile",
"runArgs": ["--env='DISPLAY'","--gpus all"],
"containerEnv": {
"QT_X11_NO_MITSHM": "1",
"XAUTHORITY": "${localEnv:XAUTH}"
}
}
For opening the image in cli I am doing :
docker run -it --rm \
--name noetic_desktop \
--hostname noetic_desktop \
--device /dev/snd \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
-v `pwd`/../Commands/bin:/home/user/bin \
-v `pwd`/../ExampleCode:/home/user/ExampleCode \
-v `pwd`/../Projects/catkin_ws_src:/home/user/Projects/catkin_ws/src \
-v `pwd`/../Data:/home/user/Data \
-env="XAUTHORITY=$XAUTH" \
--gpus all \
noetic_image:latest \
bash
However when I try to open it in vscode I get an unknown flag on the gpu argument.
Start: Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=/home/crossing-laptop/Documents/Code/docker/ros-in-container,target=/workspaces/ros-in-container --mount type=volume,src=vscode,dst=/vscode -l devcontainer.local_folder=/home/crossing-laptop/Documents/Code/docker/ros-in-container -e QT_X11_NO_MITSHM=1 -e XAUTHORITY= --env='DISPLAY' --gpus all --entrypoint /bin/sh vsc-ros-in-container-ea1fa5d968381e26dee62839190e6131-uid -c echo Container started
unknown flag: --gpus all
For reproduce ability, you can find the files at https://github.com/tomkimsour/ros-in-container.

Setting Spark driver memory in Zeppelin on Docker (local mode)

I checked many resources such as:
https://github.com/dylanmei/docker-zeppelin
http://bigdatums.net/2017/02/26/running-apache-zeppelin-on-docker/
But non has a clear way to set the driver memory, I tried to set variables like:
-e SPARK_SUBMIT_OPTIONS="--driver-memory 6G" and
-e ZEPPELIN_JAVA_OPTS="-Dspark.driver.memory=6g"
without any success.
Here is my full command:
docker run -p 8080:8080 \
-p 4040:4040 \
-v $PWD/logs:/logs \
-v $PWD/notebook:/notebook \
-v $PWD/jars:/jars \
-v $PWD/conf/interpreter.json:/zeppelin/conf/interpreter.js \
-v $PWD/data:/data \
-e ZEPPELIN_LOG_DIR='/logs' \
-e ZEPPELIN_NOTEBOOK_DIR='/notebook' \
-e SPARK_SUBMIT_OPTIONS="--driver-memory 6G" \
apache/zeppelin:0.8.1
OK, after some investigations I had to add -e ZEPPELIN_INTP_MEM="-Xmx6g" to the options.

docker volume not found for configuration option

I am trying to run this docker command
docker run --rm --name lighthouse -it \
-v $PWD/test-results/lighthouse:/home/chrome/reports \
-v $PWD/lighthouse:/lighthouse \
--cap-add=SYS_ADMIN femtopixel/google-lighthouse \
--config-path=/lighthouse/config/custom-config.js \
$full_url \
--output html \
--output json
But it is not picking up the --config-path argument, somehow I have the volume mapped wrong.
I am trying to create a volume called lighthouse but I get this error:
/usr/bin/entrypoint: 11: exec:
--config-path=/lighthouse/config/custom-config.js: not found
You should be sending the url as the first parameter I think
docker run --rm --name lighthouse -it \
-v $PWD/test-results/lighthouse:/home/chrome/reports \
-v $PWD/lighthouse:/lighthouse \
--cap-add=SYS_ADMIN femtopixel/google-lighthouse \
$full_url \
--config-path=/lighthouse/config/custom-config.js \
--output html \
--output json

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

Running Dell Boomi atom on Docker

I retrieved the most recent image using docker pull boomi/atom:2.3.0
I then run the following script (using placeholders for USERNAME, PASSWORD and ACCOUNT_ID):
#!/bin/bash
atom_name=boomidemo01
docker stop $atom_name
docker rm $atom_name
docker run -p 9090:9090 -h boomidemo01 -e URL="platform.boomi.com" \
-e BOOMI_USERNAME=<USERNAME> -e BOOMI_PASSWORD=<PASSWORD> \
-e BOOMI_ATOMNAME=$atom_name \
-e BOOMI_CONTAINERNAME=$atom_name \
-e BOOMI_ACCOUNTID=<ACCOUNT_ID> \
--name $atom_name \
-d -t boomi/atom:2.3.0
But the atom fails to start (not able to connect on port 9090 via a browser on http://127.0.0.1:9090). Did anyone managed to use docker for running a Boomi atom?
I eventually figured it out... the following script works
#!/bin/bash
atom_name=boomidemo01
host_dir=/home/user/Boomi
docker stop $atom_name
docker rm $atom_name
docker run -p 9090:9090 -h $atom_name \
-v $host_dir:/home/boomi/host_dir \
-e URL=https://platform.boomi.com \
-e BOOMI_USERNAME=<USERNAME> \
-e BOOMI_PASSWORD=<PASSWORD> \
-e BOOMI_ATOMNAME=$atom_name \
-e BOOMI_CONTAINERNAME=$atom_name \
-e BOOMI_ACCOUNTID=<ACCOUNT_ID> \
-e PROXY_HOST= \
-e PROXY_USERNAME= \
-e PROXY_PASSWORD= \
-e PROXY_PORT= \
-e DOCKERUID= \
-e SYMLINKS_DIR= \
-e ATOM_LOCALHOSTID=$atom_name \
-e INSTALL_TOKEN= \
--name $atom_name \
-d -t boomi/atom:2.3.0
Download the docker install script from within the UI.
Generate the token.
Run the script with the name, and token.
The port does not matter because Atomsphere is never pinged. It fetches processes for you.

Resources