Flip container to ubuntu

This commit is contained in:
KemoNine 2020-08-04 05:37:29 +00:00
parent d353a4582b
commit afb1bc4712

View file

@ -1,13 +1,17 @@
FROM alpine:latest
FROM ubuntu:latest
# Don't bother us for selections during install
ENV DEBIAN_FRONTEND="noninteractive"
# We work off /opt, the *nix way
WORKDIR /opt/
# need to figure out if arm64/arm64 32bit multilib/arm
COPY piframefleet/arch_detect.sh /opt/
# Install and base setup all the things
RUN apk upgrade --update --no-cache && \
apk add python3 curl jq bash unzip && \
RUN apt update && apt upgrade -y && \
apt install -y python3 curl jq bash unzip nano && \
ARCH=$(/opt/arch_detect.sh); \
echo "**** Detected arch: $ARCH ****" && \
S6_RELEASE=$(curl -sX GET "https://api.github.com/repos/just-containers/s6-overlay/tags" \
@ -16,22 +20,38 @@ RUN apk upgrade --update --no-cache && \
echo "**** Installing s6-overlay ****" && \
curl -L https://github.com/just-containers/s6-overlay/releases/latest/download/s6-overlay-${ARCH}.tar.gz \
-o /opt/s6-overlay.tar.gz && \
tar xzf /opt/s6-overlay.tar.gz -C / && \
tar xzf /opt/s6-overlay.tar.gz -C / --exclude="./bin" && \
tar xzf /opt/s6-overlay.tar.gz -C /usr ./bin && \
echo "**** wireguard ****" && \
apk add wireguard-tools && \
apt install -y git build-essential ifupdown iproute2 iptables iputils-ping libc6 libelf-dev pkg-config && \
WIREGUARD_RELEASE=$(curl -sX GET "https://api.github.com/repos/WireGuard/wireguard-tools/tags" \
| jq -r .[0].name); \
git clone https://git.zx2c4.com/wireguard-tools /opt/wireguard-tools && \
cd /opt/wireguard-tools && \
git checkout "${WIREGUARD_RELEASE}" && \
make -C src -j$(nproc) && \
make -C src install && \
cd /opt && \
echo "**** syncthing ****" && \
apk add syncthing && \
curl -s https://syncthing.net/release-key.txt | apt-key add - && \
echo "deb https://apt.syncthing.net/ syncthing stable" | tee /etc/apt/sources.list.d/syncthing.list && \
apt update && apt install -y syncthing && \
echo "**** rclone ****" && \
curl https://rclone.org/install.sh | bash && \
echo "**** filebrowser ****" && \
curl -fsSL https://filebrowser.org/get.sh | bash && \
echo "**** ansible ****" && \
apk add ansible ansible-lint ansible-doc && \
apt install -y python3-apt ansible ansible-lint ansible-doc && \
ansible-galaxy install githubixx.ansible_role_wireguard && \
echo "**** cleanup ****" && \
rm /opt/arch_detect.sh
rm /opt/s6-overlay.tar.gz && \
rm -rf /var/cache/apk/*
rm -rf /opt/wireguard-tools && \
apt remove --purge -y git build-essential pkg-config libelf-dev jq unzip && \
apt autoremove --purge -y && \
rm -rf /var/lib/apt/lists/*
# Copy the s6 related 'stuff' to the container
ADD /piframefleet/root/ /
# Wireguard related 'stuff'