Skip to content

Instantly share code, notes, and snippets.

@plavjanik
Last active June 19, 2023 23:40
Show Gist options
  • Save plavjanik/324395abe5636bf978d1c614586888ad to your computer and use it in GitHub Desktop.
Save plavjanik/324395abe5636bf978d1c614586888ad to your computer and use it in GitHub Desktop.
Zowe CLI Dockerfile
FROM node:16
# Directory where Zowe CLI settings and plug-ins will be stored:
RUN mkdir /zowe
WORKDIR /zowe
ENV ZOWE_CLI_HOME=/zowe
# Install requirements of Zowe CLI Secure Credential Store:
RUN DEBIAN_FRONTEND=noninteractive apt update
RUN DEBIAN_FRONTEND=noninteractive apt install -y libsecret-1-dev gnome-keyring dbus-x11
# Install Zowe CLI:
RUN npm install -g @zowe/cli@next
# Install Zowe CLI plug-ins:
RUN zowe plugins install @broadcom/endevor-for-zowe-cli@next
# Enable daemon mode:
RUN zowe daemon enable
ENV PATH=/zowe/bin:${PATH}
# Working directory for the users of the image:
RUN mkdir /workspace
WORKDIR /workspace
# Use entry point that initialized dbus and gnome-keyring-daemon for Zowe secure credential store and starts Zowe CLI daemon:
COPY ./docker-entrypoint.sh /zowe/
RUN chmod a+x /zowe/docker-entrypoint.sh
ENTRYPOINT [ "dbus-run-session", "--", "/zowe/docker-entrypoint.sh" ]
CMD ["zowe-init"]
@plavjanik
Copy link
Author

I am not able to try it now. This seems as one of the possible problems on Windows - https://stackoverflow.com/questions/53165471/building-docker-images-on-windows-entrypoint-script-no-such-file-or-directory

@dickywmc
Copy link

Thanks Petr for your help! The issue is resolved by using Notepad++ to change CRLF to LF on the script file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment