使用docker从串口读取数据
我有一个python代码(ard_temp.py),它使用pyserial库从USB串口读取数据,然后使用散景显示在端口50010中。 它适用于寡妇和Mac。
任何想法如何dockerize它? 我做了一个Dockerfile如下:
# Use an official Python runtime as a parent image FROM continuumio/anaconda # Set the working directory to /app WORKDIR /app # Copy the current directory contents into the container at /app ADD . /app # Install any needed packages specified in requirements.txt RUN conda install pyserial RUN conda install bokeh # Make port 80 available to the world outside this container EXPOSE 80 EXPOSE 50010 EXPOSE 50011 # Define environment variable ENV NAME World # Run app.py when the container launches CMD ["bokeh", "serve", "ard_temp.py", "--port", "50010"]
只是在Dockerfile中构build代码不起作用。
(你可以假设端口是COM3)。
- 在Windows 10中创buildAsp.net项目的Dockerfile,Docker镜像,以及如何在Docker集线器上推送该镜像并获取url来运行项目
- 如何知道docker群的GET或SET当前调度策略?