# Programming in Elixir with Docker on Windows

**URL:** <https://forum.elixirforum.com/t/programming-in-elixir-with-docker-on-windows/41794>\
**Category:** Questions\
**Tags:** docker, microsoft-windows, development, elixir-ls\
**Created:** [August 19, 2021, 9:14pm UTC](https://forum.elixirforum.com/t/programming-in-elixir-with-docker-on-windows/41794 "2021-08-19T21:14:32Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![rudolfb](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rudolfb/32/932_2.png) [@rudolfb](https://forum.elixirforum.com/u/rudolfb)\
**Post date:** [August 25, 2021, 6:26am UTC](https://forum.elixirforum.com/t/programming-in-elixir-with-docker-on-windows/41794/21 "2021-08-25T06:26:43Z")

</div>

What I have done is create a batch file in Windows, with the following contents:

> wsl --user myusername --distribution Ubuntu --exec sudo service postgresql start

Then created a task in the “Task Scheduler” in Windows that starts when I log on to Windows. This ensures that when WSL is used, the postgres service is already started. As can be seen above this is for Ubuntu, but if you can manually start your service in your distribution in the console, this can be automated in the same manner as above.

Here the prerequisites for the above to work:

```elixir
sudo visudo

```

Add the following to the end of the file:

```elixir
%sudo ALL=(ALL) NOPASSWD: /usr/sbin/service postgresql *

```

I have documented my installation steps for Elixir/Erlang in Ubuntu on WSL here, in case you are interested:

[https://github.com/rudolfb/wsl-ubuntu-elixir-install](https://github.com/rudolfb/wsl-ubuntu-elixir-install)

---

_[View the full topic](https://forum.elixirforum.com/t/programming-in-elixir-with-docker-on-windows/41794)._
