Created
September 9, 2019 17:53
-
-
Save mjohngreene/3106778faf6ba3f4c36bd8bbe0c47367 to your computer and use it in GitHub Desktop.
Dockerfile for Azure IoT SDK for Python v2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
# Update image | |
SHELL ["/bin/bash", "-c"] | |
ENV DEBIAN_FRONTEND=noninteractive | |
# install python, tools, libs, etc. | |
RUN apt-get update && apt-get install -y apt-transport-https | |
RUN apt-get update && apt-get install -y sudo cmake build-essential curl libcurl4-openssl-dev \ | |
libssl-dev uuid-dev python3-pip apt-utils python3.7 wget libffi-dev zlib1g-dev libncurses5-dev \ | |
libncursesw5-dev libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev | |
RUN pip3 install --upgrade pip && pip install -U setuptools wheel | |
# switch default python3.6 installed with ubuntu 18.04 to python3.7 | |
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 \ | |
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2 \ | |
&& update-alternatives --set python3 /usr/bin/python3.7 | |
# install Azure CLI and iot-sdk-python | |
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash | |
RUN pip3 install azure-iot-device |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment