mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-26 07:59:37 -05:00
34 lines
1.3 KiB
Docker
34 lines
1.3 KiB
Docker
FROM ubuntu:20.04
|
|
|
|
ENV DEBIAN_FRONTEND="noninteractive"
|
|
RUN apt-get update && apt-get install cmake iproute2 iputils-ping wget curl git libssl-dev -y
|
|
|
|
# Install kubectl
|
|
RUN curl -fsSLo /usr/local/bin/kubectl https://dl.k8s.io/release/v1.23.0/bin/linux/amd64/kubectl && chmod +x /usr/local/bin/kubectl
|
|
|
|
# Install Go
|
|
RUN wget https://go.dev/dl/go1.18.linux-amd64.tar.gz
|
|
RUN tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz && rm go1.18.linux-amd64.tar.gz
|
|
ENV PATH ${PATH}:/usr/local/go/bin
|
|
|
|
# Install wireguard-tools
|
|
RUN git clone -b v1.0.20210914 --depth=1 https://git.zx2c4.com/wireguard-tools && make -C wireguard-tools/src -j`nproc` && make -C wireguard-tools/src install
|
|
|
|
# Setup CLI
|
|
RUN wg genkey | (umask 0077 && tee /privatekey) | wg pubkey > /publickey
|
|
RUN mkdir -p /root/.config/constellation && touch /root/.config/constellation/config.json
|
|
|
|
# Setup AWS config
|
|
RUN mkdir -p /root/.aws && echo "[default]\nregion = us-east-2" > /root/.aws/config && echo "[default]" >> /root/.aws/credentials
|
|
|
|
# Setup gcloud config
|
|
RUN mkdir -p /root/.config/gcloud
|
|
|
|
# Use local constellation state
|
|
# COPY . /constellation
|
|
# WORKDIR /constellation
|
|
# RUN mkdir build && cd build && cmake .. && make -j`nproc` cli
|
|
|
|
COPY ./test/ /
|
|
RUN chmod +x /initiateAWS.sh && chmod +x /initiategcloud.sh
|