Skip to content
/

This weekend I was speaking at WordCamp Nijmegen about the possibilities of hosting a WordPress site using Microsoft Azure.
I’m sharing my Dutch slides here, and soon I hope to add the recording for WordPress TV in this post as well.

This weekend I was speaking at WordCamp Nijmegen about the possibilities of hosting a WordPress site using Microsoft Azure.

Even though I expected to get some criticism for dropping the Microsoft name at such an event, I felt very welcome. I experienced the event as a large group of very warm people from all over the world that are coming together to help each other out. And like Microsoft nowadays, they set a high standard with their code of conduct (in English).

I’m sharing my Dutch slides here, and soon I hope to add the recording for WordPress TV in this post as well.

Filed under Azure
Last update:
/

When recently creating a Linux Docker image using Docker for Windows, I ran into a couple of vague errors. Searching online for the error messages, there weren’t any solutions. But luckily some suggestions put me on the right track.
In this post I write about the solutions I found.

When recently creating a Linux Docker image using Docker for Windows, I ran into a couple of vague errors. Searching online for the error messages, there weren’t any solutions. But luckily some suggestions put me on the right track.
In this post I describe the solutions I found. Hopefully preventing you wasting time on the same issues.

The Dockerfile

My Dockerfile is based on the Azure App Service WordPress 0.3 Dockerfile.
In relation to the errors I encountered, the most important part in this file is the that is declared:

ENTRYPOINT ["entrypoint.sh"]

After adding the entrypoint.sh file to the directory where I build my image, I ran the docker build command:
docker build --tag blog/demo:v1 .

Once the build was completed, I launched the image locally:
docker run blog/demo:v1

But that wasn’t as straight forward as expected.

Linefeeds matter: no such file or directory

First, I got the following response:

standard_init_linux.go:195: exec user process caused "no such file or directory"

This is quite a generic error message and can describe a lot of files or directories that are part of the process of building and running Docker images and containers. My first impression was that the image building was not working correctly. But after a lot of rebuilds, the error didn’t go away.
I finally found the real source of the issue: changing the linefeeds in the entrypoint.sh file from CRLF to LF, somehow made the file discoverable.

Visual Studio Code showing CRLF in the status bar

Visual Studio Code showing CRLF in the status bar

Changing the linefeed option in Visual Studio Code

Changing the linefeed option

However, I still couldn’t run my container, only the error message had changed...

Encoding matters: exec format error

Executing the docker run command again, the output was now a different error:

standard_init_linux.go:195: exec user process caused "exec format error"

The mentioning of format error made me guess that this had something to do with incompatibilities running a Linux image on a Windows OS, or something related to x86 vs. x64. Many articles you’ll find searching on the error message are pointing in that direction.
Luckily, I overheard a colleague solving a completely unrelated issue by changing the encoding of his XML file from UTF-8 to ISO-8859-15. I figured to just try that with my file... solving the issue!

Save the file with reencoding dialog in Visual Studio Code

Save the file with reencoding

Select the file encoding dialog in Visual Studio Code

Select the file encoding

Conslusion

When using Docker on Windows and working with Linux containers, make sure the encoding and linefeeds of the files involved are correct, otherwise you are hit with vague error messages that are not helpful at all.

Filed under Docker
Last update:
/

Today I presented a session, in Dutch, titled Gebruik Azure Key Vault in je applicaties en zorg dat niemand achter je geheimen komt during the TechDays 2017 event. The presentation is about using Azure Key Vault to improve security of your solutions.
I’m sharing my slides and code, so you can start improving the security of your solutions and deployments using Azure Key Vault, the Azure Key Vault Configuration Provider and Azure Key Vault Storage Account Keys.

Today I presented a session, in Dutch, titled Gebruik Azure Key Vault in je applicaties en zorg dat niemand achter je geheimen komt during the event.
The session was about using Azure Key Vault to improve security of your solutions.

I’d like to thank everyone attending this session. It was nice to see the room overflowing. Too bad the demo gods didn’t feel worshipped enough, and had to mess up my Azure Storage connection. :/

I’m sharing my slides and code, so you can start improving the security of your solutions and deployments using , the and .
The code is available at GitHub.

Any questions about my session? Just contact me.

Filed under Azure
Last update: