Skip to content

Commit

Permalink
working version
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Zaniewski committed Jan 23, 2020
1 parent 84fee3c commit 8e31988
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
**/.ionide
README.md
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,27 @@ FROM ubuntu:18.10

COPY ./.bashrc /root/.bashrc
COPY ./.bash_profile /root/.bash_profile
COPY ./auto-complete.sh /root
COPY ./auto-complete.sh /root/auto-complete.sh

RUN apt-get update && apt-get -y install \
gnupg \
curl \
git \
bash-completion \
apt-transport-https
apt-transport-https \
apt-utils

# Install kubectl
RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
RUN echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list
RUN apt-get update && apt-get install -y kubectl

WORKDIR /root

# Configure auto-complete for bash
RUN ./auto-complete.sh
# RUN chmod +x auto-complete.sh
# RUN ./auto-complete.sh

ENV SHELL /usr/bin/bash

WORKDIR /root
ENTRYPOINT ["/bin/bash"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# zsh-in-docker
Experimental container setup with ZSH shell
# kubectl with autompletion in a docker container

2 changes: 1 addition & 1 deletion auto-complete.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

echo "source <(kubectl completion bash)" >> ~/.bashrcource <(kubectl completion bash) # setup autocomplete in bash into the current shell, bash-completion package should be installed first. \
source ~/.bashrc # add autocomplete permanently to your bash shell.

0 comments on commit 8e31988

Please sign in to comment.