Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 1.11 KB

README.md

File metadata and controls

63 lines (47 loc) · 1.11 KB

Run Apache with bootloose

Using the bootloose base like above, create a docker file which installs Apache and exposes a port like 80 or 443:

FROM ubuntu18.04

RUN apt-get update && apt-get install -y apache2
COPY index.html /var/www/html

RUN systemctl enable apache2.service

EXPOSE 80

Build that image:

$ docker built -t apache:test01 .

Create a bootloose configuration file.

$ bootloose config create --image apache:test01

Now, create a machine!

$ bootloose create

Once the machine is ready, you should be able to access apache on the exposed port.

$ docker port cluster-node0 80
0.0.0.0:32824
$ curl 0.0.0.0:32824
<!DOCTYPE html>
<html>
    <title>bootloose</title>
    <body>
        Hello, from bootloose!
    </body>
</html>

In case of multiple machines the port will be different on each machine.

$ docker port cluster-node1 80
0.0.0.0:32828

$ docker port cluster-node0 80
0.0.0.0:32826