#AzureIoT – Creating a folder 📂 in the docker definition in an ☁ Azure IoT Edge

Buy Me A Coffee

Hi !

In my (spanish) podcast I often complain that we always speak about JavaScript and Docker. And, it also applies to my blog. After my yesterday’s post, someone asked

How we can create a folder on the creation process of the Azure IoT module?

This is not an Azure IoT question, is mostly a docker one. And the answer is easy, just add these lines to create and grant permissions to a folder named [fsexchange]

# create folder for file exchange
RUN mkdir /fsexchange
RUN chown 1000 /fsexchange
RUN chmod 700 /fsexchange

RUN chown 1000 /.
RUN chmod 700 /.

And, you need to do this in each one of the docker definition files that you may use. Like

  • Dockerfile.amd64
  • Dockerfile.arm32v7
  • Dockerfile.arm64v8
  • Dockerfile.windows-amd64
  • Dockerfile.amd64.debug
  • Dockerfile.arm32v7.debug
  • Dockerfile.arm64v8.debug
docker definition files to azure Iot Modules

And that’s it! super easy!

Happy coding!

Greetings

El Bruno


References


¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.