Remove unused dockerfile

This commit is contained in:
Jarred Sumner
2023-05-15 05:19:24 -07:00
parent 386eec31ac
commit 8a68f3aa71
4 changed files with 0 additions and 146 deletions

View File

@@ -1 +0,0 @@
*

View File

@@ -1,61 +0,0 @@
# This builds the specific version of Zig used by bun
# It outputs a zig.zip file
FROM ubuntu:18.04
RUN apt-get update && apt-get install --no-install-recommends -y wget gnupg2 curl lsb-release wget software-properties-common
RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
RUN wget https://apt.llvm.org/llvm.sh --no-check-certificate
RUN chmod +x llvm.sh
RUN ./llvm.sh 13
RUN apt-get update && apt-get install --no-install-recommends -y \
ca-certificates \
curl \
gnupg2 \
software-properties-common \
cmake \
build-essential \
git \
libssl-dev \
liblld-13-dev \
libclang-13-dev \
gcc \
g++ \
clang-13 \
clang-format-13 \
libc++-13-dev \
libc++abi-13-dev \
lld-13 \
zip
RUN update-alternatives --install /usr/bin/ld ld /usr/bin/lld-13 90 && \
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-13 90 && \
update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++-13 90 && \
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-13 90
ENV CC=clang-13
ENV CXX=clang++-13
RUN mkdir /output;
WORKDIR /output
ARG TAG "jul7"
# Compile zig
RUN --mount=type=tmpfs,target=/zig-build \
cd /zig-build && \
mkdir -p /zig-build; \
git clone https://github.com/oven-sh/zig.git --depth=1; \
cd /zig-build/zig; \
cmake . -DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) && \
rm -rf .git; \
cd /zig-build; \
zip -r zig.zip zig; \
echo "${TAG}" > /output/.zig-version; \
cp zig.zip /output;

View File

@@ -1,26 +0,0 @@
FROM alpine:3.15 as base
RUN apk update
RUN apk add --no-cache cmake make clang clang-static clang-dev llvm12-dev llvm12-static musl-dev git lld libgcc gcc g++ libstdc++ build-base lld-dev lld-static llvm12-libs libc-dev xz zlib zlib-dev libxml2 libxml2-dev
ENV CXX=clang++
ENV CC=clang
ENV LDFLAGS='-L/usr/include -L/usr/include/llvm12'
ENV CXXFLAGS="-I/usr/include -I/usr/include/llvm12"
ENV PATH="/usr/bin:/usr/local/bin:/zig/bin:$PATH"
FROM base as zig
# Compile zig
RUN --mount=type=tmpfs,target=/zig-build mkdir /zig; \
cd /zig-build && \
mkdir -p /zig-build; \
git clone -b jarred/zig-sloppy-with-small-structs --single-branch --depth=1 https://github.com/oven-sh/zig.git .; \
cd /zig-build; \
cmake . -DZIG_STATIC_LLVM=ON -DLLVM_INCLUDE_DIRS=$LLVM_INCLUDE_DIRS -DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) && make install && \
rm -rf .git && \
cd /zig-build && \
cp -r /zig-build/bin /zig/bin && \
cp -r /zig-build/lib /zig/lib

View File

@@ -1,58 +0,0 @@
#!/usr/bin/env bash
set -euxo pipefail
export DOCKER_BUILDKIT=1
export BUILDKIT_ARCH=$(uname -m)
export ARCH=${BUILDKIT_ARCH}
if [ "$BUILDKIT_ARCH" == "amd64" ]; then
export BUILDKIT_ARCH="amd64"
export ARCH=x64
fi
if [ "$BUILDKIT_ARCH" == "x86_64" ]; then
export BUILDKIT_ARCH="amd64"
export ARCH=x64
fi
if [ "$BUILDKIT_ARCH" == "arm64" ]; then
export BUILDKIT_ARCH="arm64"
export ARCH=aarch64
fi
if [ "$BUILDKIT_ARCH" == "aarch64" ]; then
export BUILDKIT_ARCH="arm64"
export ARCH=aarch64
fi
if [ "$BUILDKIT_ARCH" == "armv7l" ]; then
echo "Unsupported platform: $BUILDKIT_ARCH"
exit 1
fi
# Name should be $BUILDKIT_ARCH so we only need that arg passed
export CONTAINER_NAME=zig-linux-$BUILDKIT_ARCH
export TAG=mar4
temp=$(mktemp -d)
docker build . -t $CONTAINER_NAME --progress=plain --platform=linux/$BUILDKIT_ARCH --build-arg TAG=$TAG
if (($?)); then
echo "Failed to build container"
exit 1
fi
id=$(docker create $CONTAINER_NAME:latest)
docker cp $id:/output/zig.zip $temp/$CONTAINER_NAME.zip
if (($?)); then
echo "Failed to cp out"
exit 1
fi
docker rm $id
gh release upload $TAG $temp/$CONTAINER_NAME.zip --clobber --repo oven-sh/zig