-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from nttcom/feature/add_dockerfile
Add Dockerfile
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM ubuntu:22.04 | ||
LABEL maintainer "Motoki TAKENAKA <m.takenaka@ntt.com>" | ||
|
||
# Install packages | ||
RUN apt-get update \ | ||
&& apt-get install -y bash-completion curl iproute2 | ||
|
||
# Setup Go 1.18.8 | ||
RUN curl -o ~/go1.18.8.linux-amd64.tar.gz -LO https://go.dev/dl/go1.18.8.linux-amd64.tar.gz \ | ||
&& rm -rf /usr/local/go \ | ||
&& tar -C /usr/local -xzf ~/go1.18.8.linux-amd64.tar.gz \ | ||
&& echo "export PATH=$PATH:/usr/local/go/bin" > ~/.bashrc | ||
|
||
# Enable Completion | ||
RUN echo "" >> ~/.bashrc \ | ||
&& echo "if [ -f /etc/bash_completion ] && ! shopt -oq posix; then" >> ~/.bashrc \ | ||
&& echo " . /etc/bash_completion" >> ~/.bashrc \ | ||
&& echo "fi" >> ~/.bashrc | ||
|
||
# Install Pola | ||
SHELL ["/bin/bash", "-l", "-c"] | ||
|
||
ENV GOBIN /usr/local/go/bin | ||
RUN go install github.com/nttcom/pola/cmd/...@latest | ||
|
||
# Add completion | ||
RUN pola completion bash | tee -a /usr/share/bash-completion/completions/pola >/dev/null \ | ||
&& source /usr/share/bash-completion/completions/pola |