⚠️ As of version 5.4.0a we are now using Alpine as the base OS for the default images (ex: latest and 5.4.0a). Before this version we were using OpenWRT as the base OS. Along with the change from OpenWRT to Alpine we have removed SSH support from the Alpine version.
Running the container in a development environment:
docker run -d -e R3_REGISTRATION_CODE="<registration_code>" remoteit/remoteit-agent:latest
That will run a basic Remote.it agent and automatically register it to your Remote.it account based on the registration code.
That command is sufficient for testing but should not be used in a Production environment. There are a few other docker settings we need to add in order to make this container recoverable so it can be restarted without losing your configuration.
The Remote.it Agent uses a file to keep track of this device's metadata information as well as connection info. In order to maintain this configuration there are a couple more docker settings we need to set so that when you stop and start the Remote.it Agent container it comes back as the already registered device. We'll start off with a full production example and explain the different options in the command.
-d = run this container in detached mode in the background.
--name myname = This sets the container name. Otherwise a name is generated for you.
--hostname myname = This sets the hostname within the container. The hostname is used by Remote.it to set the Device Name during registration.
-v $PWD/myname:/etc/remoteit = The path on the Docker host that will be mapped to the /etc/remoteit folder within the container. Anything which is written to the /etc/remoteit folder in the container will show up on the Docker host. That way when you stop or kill the container you can restart it and the Remote.it Agent will find the existing /etc/remoteit/config.json.
-e R3_REGISTRATION_CODE="<registration_code>" = This is your registration_code that you can get from the Remote.it Desktop by clicking on the + sign in the Device list and selecting "Docker" from the "Add a Device" section.
--restart unless-stopped = This insures that the remoteit-agent docker container restarts after a shutdown of the docker daemon such as a power on/off or reboot of the docker host.
--pull always = Always pull the image when running so we get the actual "latest" even if we have already pulled it before on this system.