Code Review Videos > C# > How To: Create a docker-compose File In A JetBrains Rider Project

How To: Create a docker-compose File In A JetBrains Rider Project

This is one of those problems that is … well, 🤦‍♂️ face palming-ly easy 🤦‍♀️ when you see how it’s done. But I confess to spending ages trying to figure this out. And Google wasn’t much help, either.

OK, so the problem is this: You want to create a new docker-compose.yaml file in your C# project in JetBrains Rider.

You have a project, it might look something like this:

c# solution view jetbrains rider

I’ve just created a brand new, empty C# project using the Rider menu.

My first requirement was to add in a docker-compose.yaml file so I could get my DB up and running.

However… how do I do this?

c# solution add new project jetbrains rider

There’s no way to add a new file. Only a new project, or a new solution folder.

Huh?

What about if I try and copy / paste an existing docker-compose.yaml file into my project?

c# edit solution jetbrains rider

No dice there, either.

How odd.

One of the options in the context menu above is to “open in” – so I opened the project in the file explorer.

From there I copy / pasted an existing docker-compose.yaml file into the directory:

adding a file to a c# solution on linux

But still, it didn’t show.

That’s when I realised I was in the wrong view!

From the top menu, change from Solution view to File System view:

c# solution view vs file system view jetbrains rider

And now you can see your file(s):

c# file system view jetbrains rider

Like I say, a bit of a face palm and probably blindingly obvious.

But not to me.

And judging by the unsolved Stack Overflow post on the same subject, not to at least a few others, either.

Leave a Reply

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