Exporting to docker - `tools' was not found under any 'PATH'

I put together a new habitat plan for WebSphere Liberty and it builds successfully. However, when I try to export it to docker from within the studio:

hab pkg export docker ./results/<package name>.hart

I get the following error:

» Binlinking tools from cattywampus/wlp-webProfile7/18.0.0.1/20180612135112 into /tmp/hab-pkg-export-docker.P4IS3NcSBDDN/rootfs/bin
✗✗✗
✗✗✗ `tools' was not found under any 'PATH' directories in the cattywampus/wlp-webProfile7/18.0.0.1/20180612135112 package
✗✗✗

I’m not sure what tools is, but I never provided any dependencies outside of core/jdk8. Is there something I’m missing to support docker exports? I know I’ve used this successfully in the past on other plans, so I’m stuck scratching my head on this one. Any help would be appreciated.

Thanks!

There shouldn’t be anything extra for docker exports. This message only occurs on export? can you share your plan here?

I wrote this using the core/tomcat8 plan as a reference:

pkg_name=wlp-webProfile7
pkg_description="WebSphere Liberty is a fast, dynamic, and easy-to-use Java application server, built on the open source Open Liberty project."
pkg_origin=taphere
pkg_version=18.0.0.1
pkg_maintainer="Keith Walters <kwalters@taphere.com>"
pkg_license=("Licensed Materials - Property of IBM")
pkg_upstream_url="https://developer.ibm.com/wasdev"
pkg_source="https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/${pkg_version}/${pkg_name}-${pkg_version}.zip"
pkg_shasum=e26cc7570958a1a59a7e2f73c4f11a5274252adeebea112be59a155d895c6560
pkg_deps=(core/jre8)
pkg_bin_dirs=(wlp/bin)
pkg_exports=(
  [host]=server.address
  [port]=server.port
  [sslport]=server.sslport
)
pkg_exposes=(port sslport)

do_unpack() {
  local source_dir=$HAB_CACHE_SRC_PATH/${pkg_name}-${pkg_version}
  local unpack_file=$HAB_CACHE_SRC_PATH/$pkg_filename

  mkdir "$source_dir"
  pushd "$source_dir" > /dev/null
  unzip "$unpack_file"

  popd > /dev/null
}

do_build() {
  return 0
}

do_install() {
  build_line "Performing install"
  mkdir -p "${pkg_prefix}"
  cp -vR ./* "${pkg_prefix}"
}

Also, in case this helps too:

hab --version
hab 0.55.0/20180321220925

Oh yep that helps. You won’t be able to export to a docker container from v0.55.0 now that the supervisor has been updated to v0.56.0 . The reason being we had breaking changes in the runtime commands for this release and (for the moment) the exporter code is tied to those supervisor releases. Go ahead and try to update to v0.56.0, rebuild and re-export your package then lets see how far that gets us!

Keen to see how you go after an upgrade.

For the moment attempting a build for me gets 404 on the download:

   webprofile7: Downloading 'https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/18.0.0.1/webprofile7-18.0.0.1.zip' to 'webprofile7-18.0.0.1.zip'
--2018-06-12 14:37:13--  https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/18.0.0.1/webprofile7-18.0.0.1.zip
Resolving public.dhe.ibm.com... 170.225.15.112
Connecting to public.dhe.ibm.com|170.225.15.112|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-06-12 14:37:14 ERROR 404: Not Found.

Upgrade fixed the export issue.

Regarding the 404, be careful how you copy the plan. The url you used had a lowercase p in the filename, but that should be uppercase.

2 Likes