Sming docker container is used to simplify environment configuration for cross-platform systems.
You will get a self-contained browser based C++ development where you can build your sming projects and flash them to your ESP device!
- KiteMatic integration for Windows & MacOS
- Out-of-the-box experience, just run the docker container
- Fully tested and compatible ESP8266 dev environment without hassle
- Alternative Web-Browser IDE (c9)
- NetBeans Integration with Code assistance and Doxygen
- Firmware flashing
- Convinient terminal connection (PR pending): Automatic (re) connection after every
make flash
- ?
If something is not working, please refer to TROUBLESHOOTING. Kitematic is, pretty much, a GUI for docker-machine. You can use it instead of Kitematic.
- BEFORE GOING ANY FURTHER Make sure Virtualization is enabled in BIOS
- Kitematic doesn't support 32 bit Windows (yet) If you have 32 bit Windows follow docker-machine way.
- Make sure to remove any previous boot2docker versions and it's vms before you proceed
- If you had virtualbox before Kitematic installation, plese remove all Host-Networks
- Download and install latest Kitematic
- Make sure
c:\Users\<Your_Username>\sming
exists - docker will map this directory to~/workspace
. - Place your project (
Basic_Blink
) toc:\Users\<Your_Username>\sming
. You will need it to import to NetBeans.
- Click New
- Search for
sming
- Click Create
Stop docker-machine
docker-machine stop kitematic
This will allow docker get access to usb2serial device connected to our host computer.
Start docker-machine back
docker-machine start kitematic
Run docker container with usb port forwarding (from Docker cli)
(There is a feature request that will allow skip this step). Please vote for it!
docker run -it -d -p 8181:80 -p 8122:22 -p 4075:4075 --device=//dev/ttyUSB0 -v /c/Users/$env:username/sming/:/root/workspace/ kireevco/sming-docker
USB device has to be connected. Otherwise omit --device=//dev/ttyUSB0
portion, c:\Users\<your_user>\sming
also has to exist
- Download and install latest Kitematic:
- Make sure
~/docker/sming-docker/workspace/
exists
- Click New
- Search for
sming
- Click Create
Stop docker-machine
docker-machine stop kitematic
This will allow docker get access to usb2serial device connected to our host computer.
Start docker-machine back
docker-machine start kitematic
(There is a feature request that will allow skip this step). Please vote for it!
docker run -it -d -p 8181:80 -p 8122:22 -p 4075:4075 --device=/dev/ttyUSB0 -v ~/docker/sming-docker/workspace/:/root/workspace/ kireevco/sming-docker
USB device has to be connected. Otherwise omit --device=/dev/ttyUSB0
portion, ~/docker/sming-docker/workspace/
also has to exist.
Install latest docker for your distro. For ubuntu run (this will add docker PPA repo also):
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker
Not necessary, but useful - add yourself to the docker group, so you can controll docker containers without 'sudo':
adduser <me> docker
Fetch latest sming-docker:
docker pull sming-docker
Run the conatiner, binding directory with workspace to the container and binding container's ports to localhost:
docker run -d --name esp -p 8180:80 -p 8122:22 -p 4075:4075 -p 10000:10000 \
-v ~/my_workspace/esp8266:/root/workspace:rw \
kireevco/sming-docker
If you want to use git inside the container, it's good to make your keys available inside. Use the following command instead:
docker run -d --name esp -p 8180:80 -p 8122:22 -p 4075:4075 -p 10000:10000 \
-v ~/.ssh:/root/.ssh \
-v ~/my_workspace/esp8266:/root/workspace:rw \
kireevco/sming-docker
If you want to make your USB-serial converter available in the container, add:
--device=/dev/ttyUSB0
to the docker run
command above, but this will force you to have it attached to USB every time you start the container.
Now just open in your browser cloud9 IDE.
NetBeans can connect to a docker container and use docker environment to build. Code completion & documentation works well. See NETBEANS.md
Currently in order to pass additional variables to docker we need to pass it adding each variable with -e
parameter like this: docker run -e WIFI_SSID=YourWifiAP -e WIFI_PWD=YourWifiPass
.
Parameters WIFI_SSID and WIFI_PWD can be also specified in Makefile-user.mk:
WIFI_SSID = YourWifiAP
WIFI_PWD = YourWifiPass
This repository contains Dockerfile of Sming framework, esp-open-sdk and Cloud9 IDE with Cloud 9 C++ Plugin. Automated build published to the public Docker Hub Registry.
Based on kdelfour/cloud9-docker