Laravel Mix has extensive documentation - https://laravel-mix.com/docs/4.0/basic-example.
You run the commands when using LaraDock. Commands can be ran from the host machine or the workspace container.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
How to run laravel-mix in a project running on Laradock docker image?
Laravel Mix has extensive documentation - https://laravel-mix.com/docs/4.0/basic-example.
You run the commands when using LaraDock. Commands can be ran from the host machine or the workspace container.
@ROBSTAR - I know how to use Laravel Mix, but I'm not sure how to run it on LaraDock. Do I need to make some additional installations to run it on docker? Could you please be more specific about how to run laravel mix commands from host machine or workspace container?
Nope, the workspace container has npm and yarn installed. How you run the mix commands si explained in detail in the link I provided. i.e. npm run dev.
Entering containers is explained in detail on the LaraDock documentation. i.e. the enter the workspace container run docker-compose exec --user=laradock workspace bash, enter your website directory and use Mix as normal.
Not sure what you're asking as your question is very vague.
Make sure Vue CLI is installed in your workspace: https://laradock.io/documentation/#install-npm-vue-cli
Note that the VUE_CLI_SERVE_HOST_PORT can conflict with other Laradock containers such as Adminer, so you might need to play a little port juggling (changing the vue port required other changes, so I found it easier to just change Adminer's port).
The hot reload server only accepts connections from localhost by default, so even if you follow the Laravel Mix instructions, it won't work because your browser can't connect to the hot reload server running in workspace. You need to edit webpack.mix.js to allow this connection:
mix.options({
hmrOptions: {
host: '0.0.0.0',
port: 8080
}
})
Make sure your blade templates are using the mix() function to bring in your js assets, see the docs: https://laravel-mix.com/docs/master/hot-module-replacement
Now you can bring up the containers and then run this in workspace: npm run hot, refresh the page and hot reload should be working.
Sorry to necro this, but this was one of the first search results when I googled this and that n00b ass cunt Robstar didn't even try to help, so I felt obligated to provide a real answer after figuring it out.
@l33thax0r2001 I've changed webpack.mix.js with the option you mentioned above but Hot Reload still not enable/function. Do I need to use 127.0.0.1 or localhost in the 'host' object? I am using Windows 10
Please or to participate in this conversation.