-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
10 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 |
---|---|---|
@@ -1,15 +1,9 @@ | ||
FROM ubuntu:22.04 | ||
FROM --platform=linux/amd64 ubuntu:22.04 | ||
LABEL maintainer "Motoki TAKENAKA <[email protected]>" | ||
|
||
# Install packages | ||
RUN apt-get update \ | ||
&& apt-get install -y bash-completion curl iproute2 | ||
|
||
# Setup Go 1.22.2 | ||
RUN curl -o ~/go1.22.2.linux-amd64.tar.gz -LO https://go.dev/dl/go1.22.2.linux-amd64.tar.gz \ | ||
&& rm -rf /usr/local/go \ | ||
&& tar -C /usr/local -xzf ~/go1.22.2.linux-amd64.tar.gz \ | ||
&& echo "export PATH=$PATH:/usr/local/go/bin" > ~/.bashrc | ||
&& apt-get install -y bash-completion curl iproute2 wget | ||
|
||
# Enable Completion | ||
RUN echo "" >> ~/.bashrc \ | ||
|
@@ -20,8 +14,12 @@ RUN echo "" >> ~/.bashrc \ | |
# Install Pola | ||
SHELL ["/bin/bash", "-l", "-c"] | ||
|
||
ENV GOBIN /usr/local/go/bin | ||
RUN go install github.com/nttcom/pola/cmd/...@latest | ||
ARG VERSION=v1.3.0-rc | ||
ARG POLA_BIN_FILE=pola_${VERSION}_linux_amd64.tar.gz | ||
|
||
RUN wget ${POLA_BIN_FILE} | ||
|
||
RUN tar -xvf -C /usr/local/bin/ ${POLA_BIN_FILE} | ||
|
||
# Add completion | ||
RUN pola completion bash | tee -a /usr/share/bash-completion/completions/pola >/dev/null \ | ||
|