Harbour on Docker

546 views
Skip to first unread message

Paweł Wojciechowski

unread,
Jan 9, 2019, 7:02:17 PM1/9/19
to Harbour Users
Hello.

Github: https://github.com/felixd/docker-harbour
Docker Hub: https://hub.docker.com/r/elmarit/harbour

I am creating Docker images with Harbour (elmarit:/harbour:hb_* images) and environments for building Harbour (elmarit:/harbour:compiler_* images)

Need Harbour 3.4? 

docker pull elmarit/harbour:latest
 or
docker pull elmarit/harbour:3.4 (Viktor)

Need Harbour 3.2 to build your project?

docker pull elmarit/harbour:3.2

Now you have working environment to build Your program, with all the libraries installed and properly configured. All you have to do is clone your repository and hbmk2 it ;)

----

Want to compile, test your own version of Harbour?

docker pull elmarit/harbour:compiler_clan6
docker pull elmarit/harbour:compiler_clan7
docker pull elmarit/harbour:compiler_clan8

Now you have properly configured environment to do that ;)

----

Images are created on top of ubuntu:latest image and were created with Docker multi-stage in mind (they are supposed to be fully working building environments, size is not critical here)


Why not to use Harbour to create microservices.

----

How layers are created and what they are used for?

+----------------------------+
| ubuntu:latest              |
+----------------------------+
| elmarit/harbour:build_*    |   # 1. Packages / libraries / ENV variables needed to build Harbour Projects are installed
+----------------------------+
| elmarit/harbour:compiler_* |   # 2. C/C++ compilers are installed on top of :build_* layer
+----------------------------+
| elmarit/harbour:hb_*       |   # 3. Harbour Projects are compiled using :compiler_* layer
+----------------------------+

----

It would be great if somebody can check if everything is fine! :)

Want to contribute? You're welcome!

Cheers, Paweł Wojciechowski

BTW, great job with Harbour Project! ;)

Message has been deleted

Rafa Carmona

unread,
Jan 11, 2019, 8:39:41 AM1/11/19
to harbou...@googlegroups.com
Planning Webservice with Harbour in Docker... ohhhh
Fantastic!!
Thank you !!

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Saludos
Rafa Carmona

Paweł Wojciechowski

unread,
Jan 11, 2019, 7:46:31 PM1/11/19
to Harbour Users
Harbour Project on Docker - Example 


git clone http://github.com/felixd/docker-harbour-example
cd docker-harbour-example
docker build -t hello .
docker images
docker run hello

Paweł Wojciechowski

unread,
Jan 12, 2019, 3:51:09 PM1/12/19
to Harbour Users
This time RESTful microservice example. You can see now how easy it is now to automatically build your application and then deploy binary in super small container.

alpine latest 3f53bb00af94 3 weeks ago 4.41MB

Alpine Linux + RESTful binary

restful latest 39564f00581e Less than a second ago 11.9MB
 
RESTful source: https://gitlab.com/felixd/harbour-restful
--
Original project
Source: https://github.com/rafathefull/restful
--

I am using two different Docker images with linked Dockerfiles. 


Above Dockerfiles are being run by Travis-CI. 
https://github.com/felixd/docker-harbour-example/blob/master/.travis.yml


 
- stage: restful-34 (same steps are done for restful-32)
   name
: "RESTful on Harbour 3.4"
   script
:
     
- docker build -t restful restful-34/
     
- docker run -d --rm -p 8002:8002 restful .    # After image is built I'm running it in container
                                                   
# + exposing port 8002
     
- docker ps                                    # Listing running Docker containers
     
- curl http://localhost:8002/v1/statusType -v  # Using Curl to test RESTful service
     
- docker images                                # Listing Docker images (sizes are shown as well, see how small "restful" image is

Since Harbour 3.2 still has problems with OpenSSL we receive an error during compilation (allowed to fail ;) )


Harbour 3.4 works just fine. Logs can be found here.
https://travis-ci.org/felixd/docker-harbour-example/jobs/478629326

* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8002 (#0)
> GET /v1/statusType HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:8002
> Accept: */*
>
< HTTP/1.1 200 OK
< Connection: keep-alive
< Content-Type: application/json;charset=UTF-8
< Date: Sat, 12 Jan 2019 02:46:33 GMT
< Content-Length: 144
<
[
{
"id": 0,
"status": "general",
"name": "primero"
},
{
"id": 1,
"status": "piltrafill",
"name": "Segundo"
}
]

Docker gives us same environment every time code is compiled. I'm only waiting stable Harbour 3.2 version ;)

Regards, Paweł.

Rafa Carmona

unread,
Jan 14, 2019, 4:00:54 PM1/14/19
to harbou...@googlegroups.com
Impresionant!!!
Thank You!!!

--

Paweł Wojciechowski

unread,
Jan 17, 2019, 7:59:44 AM1/17/19
to Harbour Users
I have switched from Alpine Linux to Google Distroless Docker images for running binaries. This helped to decrease app container size even more.

Difference between Alpine and Google images.

alpine                     latest              3f53bb00af94        3 weeks ago         4.41MB
gcr.io/distroless/static   latest              06f8d4161170        49 years ago        1.81MB

Read more.

Your help is appreciate. Please contribute with examples! Learn something new! :)

Regards, Paweł.

plink86

unread,
Oct 21, 2020, 2:46:50 AM10/21/20
to Harbour Users
how to deploy these images in kubernetes cluster on raspberry pi?
Reply all
Reply to author
Forward
0 new messages