Skip to content

Commit

Permalink
Symlink bitnami kubectl location to standard path (#36)
Browse files Browse the repository at this point in the history
The bitnami base image adds their location of kubectl to the PATH.

  PATH=/opt/bitnami/kubectl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

However this PATH location can be lost during a docker export/import
of the image, making bundling this resource difficult.

  PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

To resolve this, we now create a symbolic link in the standard PATH location:

  /usr/local/bin/kubectl -> /opt/bitnami/kubectl/bin/kubectl

The link is preserved during export/import, so our resource scripts can
still locate kubectl even though the bitnami location is no longer on
the PATH.

See https://concourse-ci.org/concourse-worker.html#installing-or-upgrading-bundled-resource-types
Closes #35
  • Loading branch information
Justin Griffin authored Nov 18, 2022
1 parent 2ea4138 commit 5041e5b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ FROM bitnami/kubectl:$KUBECTL_VERSION
USER root
RUN apt-get update && apt-get -y install --no-install-recommends jq

# symlink kubectl to the standard path location
RUN ln -s /opt/bitnami/kubectl/bin/kubectl /usr/local/bin/kubectl

ADD assets /opt/resource/
RUN chmod +x /opt/resource/*

0 comments on commit 5041e5b

Please sign in to comment.