Build a single image based on docker compose containers

This is not recommended at all. You will need to reverse engineer each image and copy the needed binaries/files into the combined image. The approach for that is to use docker multistage build: FROM apexits/ubuntu-oracle-jdk8-tomcat9 as tomcat FROM mysql:5.6.36 as mysql FROM elasticsearch:2.3.4 COPY –from=tomcat /…/tomcat-installtion …/tomcat-installation COPY –from=mysql /…/mysql-installtion …/mysql-installation … This approach is … Read more

How to use the official docker elasticsearch container?

I recommend using docker-compose (which makes lot of things much easier) with following configuration. Configuration (for development) Configuration starts 3 services: elastic itself and extra utilities for development like kibana and head plugin (these could be omitted, if you don’t need them). In the same directory you will need three files: docker-compose.yml elasticsearch.yml kibana.yml With … Read more

Build Docker Image From Go Code

The following works for me; package main import ( “archive/tar” “bytes” “context” “io” “io/ioutil” “log” “os” “github.com/docker/docker/api/types” “github.com/docker/docker/client” ) func main() { ctx := context.Background() cli, err := client.NewEnvClient() if err != nil { log.Fatal(err, ” :unable to init client”) } buf := new(bytes.Buffer) tw := tar.NewWriter(buf) defer tw.Close() dockerFile := “myDockerfile” dockerFileReader, err := … Read more