Last active
June 19, 2023 23:40
-
-
Save plavjanik/324395abe5636bf978d1c614586888ad to your computer and use it in GitHub Desktop.
Zowe CLI Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
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
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
Thanks Petr. I just tried on Windows but the same error persists (I removed -d so that any error will pop up immediately):
PS C:\Users\ManChunDickyWong\Jenkins> docker run --platform=linux/amd64 --name=zowe-cli --rm -it --mount type=bind,source="$PWD",target=/workspace,consistency=delegated zowe-cli:local
exec /zowe/docker-entrypoint.sh: no such file or directory