docs: @SuppressWarnings("deprecation")
      DockerFileBuilder createDockerFileBuilder(BuildImageConfiguration buildConfig, AssemblyConfiguration assemblyConfig) {
          DockerFileBuilder builder =
                  new DockerFileBuilder()
                          .env(buildConfig.getEnv())
                          .labels(buildConfig.getLabels())
                          .expose(buildConfig.getPorts())
                          .run(buildConfig.getRunCmds())
                          .volumes(buildConfig.getVolumes())
                          .user(buildConfig.getUser());
          if (buildConfig.getMaintainer() != null) {
              builder.maintainer(buildConfig.getMaintainer());
          }
          if (buildConfig.getWorkdir() != null) {
              builder.workdir(buildConfig.getWorkdir());
          }
          if (assemblyConfig != null) {
              builder.add(assemblyConfig.getName(), "")
                     .basedir(assemblyConfig.getTargetDir())
                     .assemblyUser(assemblyConfig.getUser())
                     .exportTargetDir(assemblyConfig.exportTargetDir());
          } else {
              builder.exportTargetDir(false);
          }
  
          builder.baseImage(buildConfig.getFrom());
  
          if (buildConfig.getHealthCheck() != null) {
              builder.healthCheck(buildConfig.getHealthCheck());
          }
  
          if (buildConfig.getCmd() != null){
              builder.cmd(buildConfig.getCmd());
          } else if (buildConfig.getCommand() != null) {
              Arguments args = Arguments.Builder.get().withShell(buildConfig.getCommand()).build();
              builder.cmd(args);
          }
  
          if (buildConfig.getEntryPoint() != null){
              builder.entryPoint(buildConfig.getEntryPoint());
          }
  
          if (buildConfig.optimise()) {
              builder.optimise();
          }
  
          return builder;
      }