Skip to content

Instantly share code, notes, and snippets.

@t1m0thyj
Last active August 29, 2022 19:50
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t1m0thyj/5d5084c07d8fb90c114d0e17ef0eae29 to your computer and use it in GitHub Desktop.
Save t1m0thyj/5d5084c07d8fb90c114d0e17ef0eae29 to your computer and use it in GitHub Desktop.
FROM rust:alpine
# Install build dependencies
RUN apk --no-cache add git musl-dev
# Download zowex source from GitHub
RUN git clone --depth 1 https://github.com/zowe/zowe-cli.git
# Build zowex binary
RUN cd zowe-cli/zowex && cargo build --verbose --release
FROM alpine:latest
# Install runtime dependencies
RUN apk --no-cache add nodejs npm
# Install Zowe CLI
RUN npm install -g @zowe/cli --ignore-scripts && npm cache clean --force && \
rm -rf /usr/local/lib/node_modules/@zowe/cli/prebuilds
# Copy zowex binary
COPY --from=0 /zowe-cli/zowex/target/release/zowe /usr/local/sbin/zowe
# Disable credential manager
RUN mkdir -p /root/.zowe/settings && \
echo "{\"overrides\":{\"CredentialManager\":false}}" >> /root/.zowe/settings/imperative.json
# Launch zowe daemon
CMD nohup /usr/local/bin/zowe --daemon > /dev/null & /bin/sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment