Difference between revisions of "Docker"
(→Docker) |
(→Docker) |
||
Line 6: | Line 6: | ||
===Commands=== | ===Commands=== | ||
− | * To run a docker image in a container/volume: | + | * To run a docker image in a container/volume:<\br> |
<code> docker run -it --rm --mount source=SOURCE,destination=/DESTINATION IMAGE</code> | <code> docker run -it --rm --mount source=SOURCE,destination=/DESTINATION IMAGE</code> | ||
Revision as of 19:42, 12 December 2020
Contents
Docker
Docker is an open-source project for automating the deployment of applications as portable, self-sufficient containers that can run on the cloud or on-premises.
Why we use it
We use docker as a way to have a portable, replicable environment to conduct development on the vision system without having physical access to the bike or any of its corresponding SoCs.
Commands
- To run a docker image in a container/volume:<\br>
docker run -it --rm --mount source=SOURCE,destination=/DESTINATION IMAGE
- For example, to run an image
anything
in a containerautobike
:
- For example, to run an image
docker run -it --rm --mount source=autobike,destination=/autobike anything
- To create a new container:
docker create [OPTIONS] IMAGE [COMMAND] [ARG...]
- To name a docker image:
docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
- To see your docker images:
docker image list
- To see docker volumes:
docker volume list
When using a container, remember to store the code inside the folder of the container so that changes will be saved.
Docker on Linux
For Ubuntu:
sudo apt-get install docker <\code>
For Red Hat:
sudo yum install docker <\code>
For Fedora:
sudo dnf install docker -y <\code>
For Arch:
sudo pacman -S docker <\code>
Docker With Pain (Windows)
Use the “edge” version or else it won’t like the windows version
Vision’s Current Used Dockerfile (as of 12/12/20)
FROM ros:noetic
- install ros package
RUN apt-get update && apt-get install -y \
vim\
ros-noetic-ros-tutorials\
git &&\
rm -rf /var/lib/apt/lists/*
CMD ["/bin/bash"]