Laradock - Localhost not working on Windows 7 using Nginx - laravel

I have setup a laradock app on my local machine. I have followed the instructions as provided: http://laradock.io/
In addition to that as I am on Windows 7, and using Docker toolbox
when access to localhost I get this error This site can’t be reached

in the condition you are using toolbox, you must place your project and laradock to c:\users\your-user, or make symlink to this forder. Check your docker machine ip using docker-machine ip default . Then access your-docker-ip and you will see your laravel app.

Related

laravel-8 storage accessing using docker

can't access images inside /public/storage
i have done php artisan storage:link
the files are visible when using my local environment but when switching to Docker environment with the same code, i can't access them (not found)
my files owner is the same as in my docker config
i test it by visiting http://127.0.0.1:8000/storage/test.png
where test.png is inside public/storage
I have 3 services inside my docker-compose file
Nginx
PHP
MYSQL
I think the problem from permissions but i can't figure out the solution
As far as I know, each docker has an IP address. So, you have to start the server with the IP address of docker container. However, to avoid errors from docker's dynamic IP address, you use 0.0.0.0 instead of the IP address of docker because 0.0.0.0 means all IPv4 addresses on the local machine. To resolve your issue, you use the following command in docker.
php artisan serve --host 0.0.0.0
Note:
Maybe you will get another error, let me know if you meet them.
if anyone faced the same issue.
i managed to solve this by removing the symlink created by laravel and make my own one from my nginx container based on the real path inside my container

How to find out (or what is) the correct Docker Host Url to use in jenkins to specify Docker host?

I have docker (docker for windows server) and jenkins both running on a windows server 2019 and I am trying to add Docker Host URI in Jenkins but I ran into timeout error or connection refused error all time and cannot connect to docker host.
I tried the following urls:
tcp://:2375 (or 2376),
tcp://localhost:2375 (or 2376),
tcp://127.0.0.1:2375 (or 2376)
Do I have to configure anything else on docker or jenkins?. I cannot move forward in this issue. it would really help me if any one can provide some guidance to solve this.
I was facing similar issue. You need to expose your docker demon at port 2375. I did it via docker desktop.
Then added HOST URl as tcp://127.0.0.1:2375

How to access a web application running as a container in ubuntu from my windows system

I am running a web application(copied from github examples) that is running as a container in a remote ubuntu VM. The application is a Node JS application that is using mysql database. I brought the application up using docker-compose in ubuntu.
The application came up as http://172....:3000 using a network port. The ip address is displayed in the docker-compose terminal. In the ubuntu system, when i do curl http://172....:3000, it gives a proper success response. The ip address is a container network address. It is not the VM's ip address. There is no firewall.
How to access the web application from my windows 7 machine. When I tried accessing using http://VM Ip address:3000, it is not hitting ubuntu system. I am not getting any message in the docker-compose terminal. Can anyone help here ?
ports:
- "3031:3000"
similar line in your docker compose means you have published port 3000 of your container to port 3031 of your Ubuntu VM.
now you can access your client service as http://<ubuntu-ip>:3031 but before this, you need to allow access to port 3031

Laravel: browse to phpmyadmin in Homestead Vagrant box

I just installed Homestead / Vagrant box for a project. I was able to set it up and now I can see the page of the Laravel project in the browser.
I am used to MAMP so the servers are there and I can just browse to http://127.0.0.1/phpmyadmin/ but how can I access it in the virtual machine? where are the settings to be made for port forwarding etc?
Since you're on MacOS you're better off using Sequel Pro. It's a free app to connect to MySQL servers.
You can connect to homestead by using the following settings:
Host: 127.0.0.1
Port: 33060
User: homestead
Pass: secret

How to access docker container service from outside world like from parent windows host machine

As part of "How to access docker container service from outside world like from parent windows host machine "
I followed the following step :
1) On windows machine(10.204.255./16) , I created vagrant VM (172.17.0./24) . Inside vagrant VM I created different docker images based on my requirements.
2) As part of docker image creation, created centos:6.6 images and run installed ACE-TAO service inside that.
3) TAO service is running properly, and it is binding with the specific container ip: specific port (like 172.17.0.10:13021)
Reference: Able to create images and run the images to create container and install TAO rpm and TAO service running successfully.
Issues is like i'm not able to ping this ip from outside world like from my windows machine
I'm attaching my dockerfile here
FROM centos:6.6
MAINTAINER praveen
WORKDIR /root/
ADD TAO-1.7.7-0.x86_64.rpm /root/TAO-1.7.7-0.x86_64.rpm
RUN rpm -ivh TAO-1.7.7-0.x86_64.rpm
CMD ["/etc/init.d/tao", "start"]
EXPOSE 13021
I believe this is common usecase of docker is like :
Installed service on dockerized container with are accessible from host machine , if we try to access with ip:port
ACE-TAO behavior is like ,rpm installed to specific host , so we can access corba service from this url : corba://(tao_service_runnig_ip):(listening port)
In order to meet this requirement , i need to access the from host machine

Resources