Coder Social home page Coder Social logo

Comments (8)

DonMartin76 avatar DonMartin76 commented on August 24, 2024

Hey peacemakr,

The IP you will need to access is the IP address of your docker host. IIf you installed docker in a VM (using which tool? VirtualBox? vmWare?) you will need to use that IP address. Depending on the setup of your virtualization tool it may be that it doesn't let you access port 443 through its firewall/NAT network setup, so it's really difficult to tell where to dig. In case you installed docker locally on your Windows or Mac OS X machine, you should be able to access the portal at localhost, but using a Host set to what you defined (for the example that's portal.local).

If you could share some more details on your docker setup, I might be able to assist. Running wicked in docker is perhaps not the simplest thing to start with though, you may want to read up on how docker works first, otherwise these things may be quite confusing.

Best regards, Martin

from wicked.haufe.io.

peacemakr avatar peacemakr commented on August 24, 2024

Thanks Martin.

I am using VirtualBox. There was a server running (and accessible) on port 443 before, so VM itself is not going to block that port. The eth0 interface is the actual VM's IP address and I've already tried accessing it from another host on the same network but without success.

I think br-3a826545134d is the new interface that gets created when I run " docker-compose up -d". However, not sure why its using a different 172.x network for itself and for the container. Is it possible to configure the network in docker?

from wicked.haufe.io.

peacemakr avatar peacemakr commented on August 24, 2024

I restarted VM and now running container gives the following error

Creating network "wickeddeploysample_default" with the default driver
ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule:  (iptables failed: iptables --wait -t nat -I DOCKER -i br-4824b0fed6e0 -j RETURN: iptables: No chain/target/match by that name.
 (exit status 1))

ran it as root.

from wicked.haufe.io.

DonMartin76 avatar DonMartin76 commented on August 24, 2024

You say you are using VirtualBox, but for what? Two possibilities: Either you are using VirtualBox to run an Ubuntu (or similar Linux OS) where you installed docker? Or are you using an old docker for Windows installation (<1.12) where the boot2docker image (i.e. the docker host) runs in VirtualBox?

docker-compose will always create a network to work in, when calling up. This network (also called "project") will as a default be named after the directory your docker-compose.yml resides in, in your case wickeddeploysample. You can check for dangling networks by issuing a docker network ls and subsequently a docker network rm <id> if it's no longer needed.

Compose will always use internal network ranges (usually 172.16+.x.x) as it creates a NATted network inside the docker host. As a default, containers can access each other inside this network as long as their corresponding Dockerfiles do an EXPOSE of a port. The ports will only be available to the outside if they are additionally exposed in either a docker-compose.yml file (as is the case with the publb container in the wicked.haufe.io sample compose file).

If you want to take down an entire docker "composition" including the network, use docker-compose down, but please note that this will also delete the persistent volumes.

I think it may be helpful for you to read up a little on docker basics first, it makes understanding how this entire things works a lot easier.

from wicked.haufe.io.

peacemakr avatar peacemakr commented on August 24, 2024

I'm running this docker+wicked setup on a Ubuntu Trusty VM using Virtualbox.
My development/test machine is separate from this VM.

You're right about reading up on Docker but thats too time consuming for testing a new product.

from wicked.haufe.io.

DonMartin76 avatar DonMartin76 commented on August 24, 2024

OK, so the missing bits and pieces here would now be:

  • You will need to set up port forwarding on Virtual Box for your Ubuntu VM (Change... -> Network -> Adapter 1 -> Port Forwarding -> 443 to 443)
  • Add a local /etc/hosts entry for portal.local and api.portal.local pointing to the IP of the Virtual Box VM

Whenever you use HAproxy to do VHOST resolution like we do here, it's not enough to know the IP of the host, you also have to send the correct Host: header with the request, which is automatically done by browsers, but only if it actually thinks the name is mapped to the IP (which is necessary here).

In other orchestration runtimes you may not need this, and instead use other types of load balancers, but this is how the default setup looks like.

from wicked.haufe.io.

DonMartin76 avatar DonMartin76 commented on August 24, 2024

Did this work out, or did you run into other Docker issues?

from wicked.haufe.io.

DonMartin76 avatar DonMartin76 commented on August 24, 2024

Closing this as I feel it's rather docker related than wicked related. A main prerequisite for running wicked is knowing your way around docker (or other orchestrations able to run docker containers). There are currently no plans on changing this to enable a more "traditional" deployment.

from wicked.haufe.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.