美文网首页
Docker command line for the proj

Docker command line for the proj

作者: Chao已被使用 | 来源:发表于2020-09-25 01:42 被阅读0次

    Start container:

    docker run -ti --privileged -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev/bus/usb:/dev/bus/usb -v $XAUTH:/root/.Xauthority --net host ericssonsics/5g-coral-v1:rh
    
    cd pybombs
    
    source setup.sh
    

    Configure network:

    Ethernet network:=docker run -ti --privileged -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev/bus/usb:/dev/bus/usb -v $XAUTH:/root/.Xauthority --net network_lora --ip 172.20.0.4 ericssonsics/5g-coral-v1:rh
    
    docker network create --subnet=172.20.0.0/16 network_lora
    

    To find network running in docker container:

    docker inspect "container name
    

    Copy and paste:

    docker cp foo.txt mycontainer:/foo.txt
    
    docker cp mycontainer:/foo.txt foo.txt
    
    sudo docker cp /home/user/gr_oot/gr-packet_scheduler zen_maxwell:/home/user/Gitlab_upload_LoRa/
    

    Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE

    docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
    

    Docker login and push

    docker login -u eabsics -p ieatrise
    
    docker build . -t eabsics/5g-dive:tagname
    
    docker push eabsics/5g-dive:tagname
    

    删除所有docker container/images

    docker container rm $(docker container ls -aq)
    docker container stop $(docker container ls -aq)
    docker rmi $(docker images)
    

    保存docker存为local image

    sudo docker commit [CONTAINER_ID] [new_image_name]
    sudo docker commit deddd39fa163 ubuntu-nmap
    

    相关文章

      网友评论

          本文标题:Docker command line for the proj

          本文链接:https://www.haomeiwen.com/subject/ivjxuktx.html