Skip to content

Commit

Permalink
Merge pull request #205 from ksandermann/pipx_fix
Browse files Browse the repository at this point in the history
Pipx fix
  • Loading branch information
kilianjrk authored Dec 21, 2023
2 parents 7bbb2d1 + 97ee164 commit 11eaeb2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
7 changes: 1 addition & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,6 @@ RUN pip3 install \
pyvmomi \
setuptools

# replace pip with pipx for azurecli
RUN pip3 install --user pipx

ENV PATH="$PATH:$HOME/.local/bin"

#install ansible
RUN if [[ ! -z ${ANSIBLE_VERSION} && ! -z ${JINJA_VERSION} ]] ; then \
pip3 install \
Expand All @@ -281,7 +276,7 @@ RUN if [[ ! -z ${ANSIBLE_VERSION} && ! -z ${JINJA_VERSION} ]] ; then \

#install azure-cli
RUN if [[ ! -z ${AZ_CLI_VERSION} ]] ; then \
pipx install azure-cli==${AZ_CLI_VERSION}; \
pip3 install --no-cache-dir --ignore-installed azure-cli==${AZ_CLI_VERSION}; \
fi

#test azure-cli
Expand Down
10 changes: 2 additions & 8 deletions Dockerfile.minimal
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ LABEL maintainer="[email protected]"
RUN mkdir -p /root/download/
WORKDIR /root/download

ENV PATH="venv/bin:$PATH"

RUN apk upgrade --update-cache --available && \
apk add --no-cache --update \
bash \
Expand All @@ -23,7 +21,6 @@ RUN apk upgrade --update-cache --available && \
python3 \
python3-dev \
py3-pip \
pipx \
jq \
wget \
yq \
Expand All @@ -34,16 +31,13 @@ RUN apk upgrade --update-cache --available && \
RUN sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" && \
apk add --no-cache --update zsh-vcs && rm -rf /var/cache/apk/*

RUN apk add --no-cache --update gcc libc-dev linux-headers pipx && rm -rf /var/cache/apk/*

RUN pipx install azure-cli && \
pipx ensurepath
RUN apk add --no-cache --update gcc libc-dev linux-headers && rm -rf /var/cache/apk/*

RUN pip install azure-cli --break-system-packages

RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl


#GENERICS
ENV EDITOR nano

Expand Down
9 changes: 4 additions & 5 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ function testBinaries {
gcloud version
}

if [[ "$(docker ps -a | grep toolbox)" ]]
then
attachToToolbox
if docker ps -q --filter "name=toolbox" | grep -q . ; then
attachToToolbox
else
startNewToolbox
fi
startNewToolbox
fi

0 comments on commit 11eaeb2

Please sign in to comment.