Skip to content

Instantly share code, notes, and snippets.

@congnt24
Created August 13, 2018 02:47
Show Gist options
  • Save congnt24/9652cac96043b24508c0e9d5312d30b3 to your computer and use it in GitHub Desktop.
Save congnt24/9652cac96043b24508c0e9d5312d30b3 to your computer and use it in GitHub Desktop.
dockerfile for install rancher cli
# Set base image.
FROM alpine:latest
MAINTAINER Dominik Hahn <[email protected]>
# Define rancher version
ENV RANCHER_CLI_VERSION=v0.6.9
# Install dependencies and rancher
RUN apk add --quiet --no-cache ca-certificates && \
apk add --quiet --no-cache --virtual build-dependencies curl && \
curl -sSL "https://github.com/rancher/cli/releases/download/${RANCHER_CLI_VERSION}/rancher-linux-amd64-${RANCHER_CLI_VERSION}.tar.gz" | tar -xz -C /usr/local/bin/ --strip-components=2 && \
chmod +x /usr/local/bin/rancher && \
apk del build-dependencies && \
rm -rf /var/cache/*
# Set working directory
RUN mkdir /app
WORKDIR /app
# Executing defaults
CMD ["/usr/local/bin/rancher", "--version"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment