Newer
Older
# avoid warnings by switching to noninteractive
# local pyvenv to avoid conflicts with system
ENV PYVENV ${HOME}/pyvenv
ENV PATH ${GOPATH}/bin:${PYVENV}/bin:/usr/local/go/bin:${PATH}
RUN \
# install required tools
sudo apt-get update && \
sudo apt-get install -y \
libffi-dev \
libncurses5 \
libncursesw5 \
libssl-dev \
python3-netaddr \
&& \
# clean up
sudo apt-get autoremove -y && \
sudo apt-get clean -y && \
sudo rm -rf /var/lib/apt/lists/* && \
# create pyvenv
python3 -m venv --system-site-packages ${PYVENV} && \
# update pip tools into pyvenv
pip install -U \
pip \
wheel \
#sudo gpg --keyserver hkp://eu.pool.sks-keyservers.net --recv-key 51852D87348FFC4C && \
sudo gpg --keyserver hkp://eu.pool.sks-keyservers.net --recv-key 72D7468F && \
RUN \
# packer
sudo curl -LOSs https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip && \
sudo curl -LOSs https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_SHA256SUMS && \
sudo curl -LOSs https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_SHA256SUMS.sig && \
sudo gpg --verify packer_${PACKER_VERSION}_SHA256SUMS.sig packer_${PACKER_VERSION}_SHA256SUMS && \
sudo shasum -a 256 -c packer_${PACKER_VERSION}_SHA256SUMS --ignore-missing && \
sudo unzip -d /usr/local/bin packer_${PACKER_VERSION}_linux_amd64.zip && \
sudo rm -f packer_${PACKER_VERSION}* && \
# golang
sudo curl -LOSs https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz && \
sudo tar -C /usr/local/ -xzf go${GO_VERSION}.linux-amd64.tar.gz && \
sudo rm -f go${GO_VERSION}* && \
go get \
github.com/mdempsky/gocode \
github.com/uudashr/gopkgs/cmd/gopkgs \
github.com/ramya-rao-a/go-outline \
github.com/stamblerre/gocode \
github.com/rogpeppe/godef \
github.com/sqs/goreturns \
golang.org/x/lint/golint \
RUN \
# ansible & co
pip install -r requirements.dev.txt && \
sudo rm requirements.dev.txt && \
:
ARG OVFTOOL_NAME=VMware-ovftool-${OVFTOOL_VERSION}-lin.x86_64
ARG OVFTOOL_URL=https://nextcloud.ubicast.net/s/6QfAyAgtmHmbrca/download?path=%2FVMware%20Tools&files=${OVFTOOL_NAME}
RUN \
# ovf tool
sudo curl -o ${OVFTOOL_NAME}.bundle -LSs "${OVFTOOL_URL}.bundle" && \
sudo curl -o ${OVFTOOL_NAME}.sha256 -LSs "${OVFTOOL_URL}.sha256" && \
sudo shasum -a 256 -c ${OVFTOOL_NAME}.sha256 --ignore-missing && \
sudo sh ${OVFTOOL_NAME}.bundle -p /usr/local --console --required --eulas-agreed && \
sudo rm ${OVFTOOL_NAME}.* && \
:
# switch back to dialog for any ad-hoc use of apt-get