diff --git a/contrib/docker/.dockerignore b/contrib/docker/.dockerignore deleted file mode 100644 index 411cda423c..0000000000 --- a/contrib/docker/.dockerignore +++ /dev/null @@ -1,4 +0,0 @@ -opt/ -build/ -solana/target -agave/target diff --git a/contrib/docker/README.md b/contrib/docker/README.md deleted file mode 100644 index 5783ee5ca8..0000000000 --- a/contrib/docker/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Container configs - -Dockerfiles and docker-compose configs for various platforms. - -## Provides for two methods of use - -### Using compose file - -#### cd into the directory of choice and execute the following: - -`docker-compose|podman-compose up -d` - -This will build the container, if necessary, and kick off a run with fddev. One stop shopping! - -#### To stop the run, from the same directory: - -`docker-compose|podman-compose down` - -### Using dockerfile - -You can build the container using the Dockerfile and run however you wish. - -#### To build, cd into directory and: - -`docker|podman build . -t firedancer:latest -t firedancer:0.1` - -#### to run: - -`docker|podman run -it -d --rm --net=host --name=firedancer --privileged --ipc=host --volume /data/firedancer:/home/firedancer/.firedancer:Z firedancer:latest fddev --config /opt/firedancer/config/default.toml dev --monitor` - -## Notes - -At this time the container **MUST** be run as root, either directly or via `sudo`, to provide the necessary capabilities. - -Can build off a specific release, tag, or branch. Default is *main*. Edit compose-file or pass `docker build . --build-arg=GITTAG=` - -Machine type defaults to *linux_gcc_x86_64*. This can be overridden in the compose file or with `--build-arg=MACHINE=`. See *config/machine* for available machine types. - -RedHat `ubi8`|`ubi9` will not run on a non-rhel host due to how the subscription-manager (rhsm) in the container piggybacks off the host's subscriptions. If you want to build for RedHat or CentOS, try the rocky8 runner. diff --git a/contrib/docker/alpine/Dockerfile b/contrib/docker/alpine/Dockerfile deleted file mode 100644 index 22053cf1fa..0000000000 --- a/contrib/docker/alpine/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -# Firedancer GNU/Linux build based on Alpine 3 -# -# Build context is repo root. -# -# This image is not recommended for production use, -# and is purely provided for compatibility testing. -# -# Currently known to be broken due to missing ucontext API. - -# FIXME Drop permissions -# FIXME multi-arch support - -ARG BUILDER_BASE_IMAGE=alpine@sha256:6457d53fb065d6f250e1504b9bc42d5b6c65941d57532c072d929dd0628977d0 # 3.19.1 -ARG RELEASE_BASE_IMAGE=alpine@sha256:6457d53fb065d6f250e1504b9bc42d5b6c65941d57532c072d929dd0628977d0 # 3.19.1 - -# Set up build container - -FROM ${BUILDER_BASE_IMAGE} AS builder - -# Fetch and build source dependencies - -RUN apk add bash git libstdc++ -WORKDIR /firedancer -COPY deps.sh ./ -RUN FD_AUTO_INSTALL_PACKAGES=1 ./deps.sh check install - -# Build source tree - -COPY . ./ -RUN make EXTRAS=static -j all --output-sync=target - -# Set up release container - -FROM ${RELEASE_BASE_IMAGE} AS release - -COPY --from=builder /firedancer/build/native/gcc/bin /opt/firedancer/bin -ENV FD_LOG_PATH="" -ENV PATH="/opt/firedancer/bin:$PATH" - -LABEL org.opencontainers.image.title="Firedancer beta (Alpine 3 base)" \ - org.opencontainers.image.url=https://firedancer.io \ - org.opencontainers.image.source=https://github.com/firedancer-io/firedancer \ - org.opencontainers.image.authors="Firedancer Contributors " diff --git a/contrib/docker/rocky8/docker-compose.yml b/contrib/docker/rocky8/docker-compose.yml deleted file mode 100644 index 19f41daed5..0000000000 --- a/contrib/docker/rocky8/docker-compose.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -version: "3.8" -services: - firedancer: - image: firedancer_rocky8:latest -# increment this if building a new version - image: firedancer_rocky8:0.1 - volumes: - - /data/firedancer:/home/firedancer/.firedancer:Z - - /data/firedancer/log:/opt/firedancer/log:Z - ipc: host - network_mode: "host" - privileged: true - command: fddev --config /opt/firedancer/config/default.toml dev - build: - context: ../ubi8 - args: -# Defaults provided both here and in Dockerfile. This will override values in Dockerfile. - BUILDER_BASE_IMAGE: rockylinux@sha256:72afc2e1a20c9ddf56a81c51148ebcbe927c0a879849efe813bee77d69df1dd8 #8.5.20220308 - RELEASE_BASE_IMAGE: rockylinux@sha256:72afc2e1a20c9ddf56a81c51148ebcbe927c0a879849efe813bee77d69df1dd8 #8.5.20220308 - MACHINE: linux_gcc_x86_64 - RUST_VERSION: 1.73.0 -# We can define a release, tag, or branch rather than main. Defaults to main if undefined. - GITTAG: diff --git a/contrib/docker/rocky9/docker-compose.yml b/contrib/docker/rocky9/docker-compose.yml deleted file mode 100644 index 3db1d72d80..0000000000 --- a/contrib/docker/rocky9/docker-compose.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -version: "3.8" -services: - firedancer: - image: firedancer_rocky9:latest -# increment this if building a new version - image: firedancer_rocky9:0.1 - volumes: - - /data/firedancer:/home/firedancer/.firedancer:Z - - /data/firedancer/log:/opt/firedancer/log:Z - ipc: host - network_mode: "host" - privileged: true - command: fddev --config /opt/firedancer/config/default.toml dev - build: - context: ../ubi9 - args: -# Defaults provided both here and in Dockerfile. This will override values in Dockerfile. - BUILDER_BASE_IMAGE: rockylinux@sha256:45cc42828cc5ceeffa3a9b4f6363fb582fac3ab91f77bf403daa067f8f049f96 #9.3.20231119 - RELEASE_BASE_IMAGE: rockylinux@sha256:45cc42828cc5ceeffa3a9b4f6363fb582fac3ab91f77bf403daa067f8f049f96 #9.3.20231119 - MACHINE: linux_gcc_x86_64 - RUST_VERSION: 1.73.0 -# We can define a release, tag, or branch rather than main. Defaults to main if undefined. - GITTAG: diff --git a/contrib/docker/ubi8/Dockerfile b/contrib/docker/ubi8/Dockerfile deleted file mode 100644 index 018e5f6d08..0000000000 --- a/contrib/docker/ubi8/Dockerfile +++ /dev/null @@ -1,58 +0,0 @@ -# Firedancer GNU/Linux build based on Red Hat Universal Base Image 8.5 -# -# Build context is repo root. -# -# Not ready for production use. - -# Pin a specific image version rather than "latest" to avoid introducing issues with updates -# UBI8.5 -ARG BUILDER_BASE_IMAGE=docker.io/redhat/ubi8@sha256:56c374376a42da40f3aec753c4eab029b5ea162d70cb5f0cda24758780c31d81 # 8.5-236.1647448331 -ARG RELEASE_BASE_IMAGE=docker.io/redhat/ubi8@sha256:56c374376a42da40f3aec753c4eab029b5ea162d70cb5f0cda24758780c31d81 # 8.5-236.1647448331 - -# Set up build container -FROM ${BUILDER_BASE_IMAGE} AS builder - -RUN INSTALL_PKGS="git hostname patch bzip2" && \ - dnf install -y --setopt=tsflags=nodocs https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \ - dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS - -# Install Rust -ARG RUST_VERSION=1.73.0 -RUN curl "https://sh.rustup.rs" -sfo /tmp/rustup.sh && \ - sh /tmp/rustup.sh -y --default-toolchain ${RUST_VERSION} - -ENV PATH="/root/.cargo/bin:${PATH}" - -# Fetch and build source dependencies -ENV WORKDIR=/firedancer -WORKDIR ${WORKDIR} - -# Default can be overridden on commandline or in docker-compose file -ARG MACHINE=linux_gcc_x86_64 -ARG GITTAG -RUN git clone --recurse-submodules https://github.com/firedancer-io/firedancer.git ${WORKDIR} && \ - [ -n ${GITTAG} ] && git checkout ${GITTAG} && \ - FD_AUTO_INSTALL_PACKAGES=1 ./deps.sh check install && \ - MACHINE=${MACHINE} make -j all rust --output-sync=target && \ - cp -a $(find build -type d -name bin) build/out - -# Set up release container -FROM ${RELEASE_BASE_IMAGE} AS release - -RUN useradd firedancer && \ - dnf install -y bzip2 - -COPY --from=builder /firedancer/build/out /opt/firedancer/bin -COPY --from=builder /firedancer/src/app/fdctl/config /opt/firedancer/config -COPY --chmod=555 entrypoint.sh / - -ENV FD_LOG_PATH="/opt/firedancer/log" -ENV PATH="/opt/firedancer/bin:$PATH" - -ENTRYPOINT [ "/entrypoint.sh" ] -CMD [ "/bin/bash" ] - -LABEL org.opencontainers.image.title="Firedancer (ubi8.5 base)" \ - org.opencontainers.image.url=https://firedancer.io \ - org.opencontainers.image.source=https://github.com/firedancer-io/firedancer \ - org.opencontainers.image.authors="Firedancer Contributors " diff --git a/contrib/docker/ubi8/docker-compose.yml b/contrib/docker/ubi8/docker-compose.yml deleted file mode 100644 index 816d74c909..0000000000 --- a/contrib/docker/ubi8/docker-compose.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -version: "3.8" -services: - firedancer: - image: firedancer_ubi8:latest -# increment this if building a new version - image: firedancer_ubi8:0.1 - volumes: - - /data/firedancer:/home/firedancer/.firedancer:Z - - /data/firedancer/log:/opt/firedancer/log:Z - ipc: host - network_mode: "host" - privileged: true - command: fddev --config /opt/firedancer/config/default.toml dev - build: - context: . - args: -# Defaults provided both here and in Dockerfile. This will override values in Dockerfile. - BUILDER_BASE_IMAGE: docker.io/redhat/ubi8@sha256:56c374376a42da40f3aec753c4eab029b5ea162d70cb5f0cda24758780c31d81 - RELEASE_BASE_IMAGE: docker.io/redhat/ubi8@sha256:56c374376a42da40f3aec753c4eab029b5ea162d70cb5f0cda24758780c31d81 - MACHINE: linux_gcc_x86_64 - RUST_VERSION: 1.73.0 -# We can define a release, tag, or branch rather than main. Defaults to main if undefined. - GITTAG: diff --git a/contrib/docker/ubi8/entrypoint.sh b/contrib/docker/ubi8/entrypoint.sh deleted file mode 100644 index d4375f8f17..0000000000 --- a/contrib/docker/ubi8/entrypoint.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -e - -sed -i 's~^user.*$~user = "firedancer"~' /opt/firedancer/config/default.toml - -exec "$@" diff --git a/contrib/docker/ubi9/Dockerfile b/contrib/docker/ubi9/Dockerfile deleted file mode 100644 index 764b7c2845..0000000000 --- a/contrib/docker/ubi9/Dockerfile +++ /dev/null @@ -1,60 +0,0 @@ -# Firedancer GNU/Linux build based on Red Hat Universal Base Image 9.2-755 -# -# Build context is repo root. -# -# Not ready for production use. - -# Pin a specific image version rather than "latest" to avoid introducing issues with updates -# UBI8.5 -ARG BUILDER_BASE_IMAGE=docker.io/redhat/ubi9@sha256:bd30f546dfb78ef0fb7789376afd22671319007af473f03370dafab34302c857 # 9.2-755 -ARG RELEASE_BASE_IMAGE=docker.io/redhat/ubi9@sha256:bd30f546dfb78ef0fb7789376afd22671319007af473f03370dafab34302c857 # 9.2-755 - -# Set up build container -FROM ${BUILDER_BASE_IMAGE} AS builder - -# Protobuf compiler appears to be missing from ubi9 -RUN INSTALL_PKGS="git hostname patch bzip2" && \ - dnf install -y --setopt=tsflags=nodocs https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \ - https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/protobuf-compiler-3.14.0-13.el9.x86_64.rpm && \ - dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS - -# Install Rust -ARG RUST_VERSION=1.73.0 -RUN curl "https://sh.rustup.rs" -sfo /tmp/rustup.sh && \ - sh /tmp/rustup.sh -y --default-toolchain ${RUST_VERSION} - -ENV PATH="/root/.cargo/bin:${PATH}" - -# Fetch and build source dependencies -ENV WORKDIR=/firedancer -WORKDIR ${WORKDIR} - -# Default can be overridden on commandline or in docker-compose file -ARG MACHINE=linux_gcc_x86_64 -ARG GITTAG -RUN git clone --recurse-submodules https://github.com/firedancer-io/firedancer.git ${WORKDIR} && \ - [ -n ${GITTAG} ] && git checkout ${GITTAG} && \ - FD_AUTO_INSTALL_PACKAGES=1 ./deps.sh check install && \ - MACHINE=${MACHINE} make -j all rust --output-sync=target && \ - cp -a $(find build -type d -name bin) build/out - -# Set up release container -FROM ${RELEASE_BASE_IMAGE} AS release - -RUN useradd firedancer && \ - dnf install -y bzip2 - -COPY --from=builder /firedancer/build/out /opt/firedancer/bin -COPY --from=builder /firedancer/src/app/fdctl/config /opt/firedancer/config -COPY --chmod=555 entrypoint.sh / - -ENV FD_LOG_PATH="/opt/firedancer/log" -ENV PATH="/opt/firedancer/bin:$PATH" - -ENTRYPOINT [ "/entrypoint.sh" ] -CMD [ "/bin/bash" ] - -LABEL org.opencontainers.image.title="Firedancer (ubi9.2 base)" \ - org.opencontainers.image.url=https://firedancer.io \ - org.opencontainers.image.source=https://github.com/firedancer-io/firedancer \ - org.opencontainers.image.authors="Firedancer Contributors " diff --git a/contrib/docker/ubi9/docker-compose.yml b/contrib/docker/ubi9/docker-compose.yml deleted file mode 100644 index fcea489861..0000000000 --- a/contrib/docker/ubi9/docker-compose.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -version: "3.8" -services: - firedancer: - image: firedancer_ubi9:latest -# increment this if building a new version - image: firedancer_ubi9:0.1 - volumes: - - /data/firedancer:/home/firedancer/.firedancer:Z - - /data/firedancer/log:/opt/firedancer/log:Z - ipc: host - network_mode: "host" - privileged: true - command: fddev --config /opt/firedancer/config/default.toml dev - build: - context: . - args: -# Defaults provided both here and in Dockerfile. This will override values in Dockerfile. - BUILDER_BASE_IMAGE: docker.io/redhat/ubi9@sha256:bd30f546dfb78ef0fb7789376afd22671319007af473f03370dafab34302c857 - RELEASE_BASE_IMAGE: docker.io/redhat/ubi9@sha256:bd30f546dfb78ef0fb7789376afd22671319007af473f03370dafab34302c857 - MACHINE: linux_gcc_x86_64 - RUST_VERSION: 1.73.0 -# We can define a release, tag, or branch rather than main. Defaults to main if undefined. - GITTAG: diff --git a/contrib/docker/ubi9/entrypoint.sh b/contrib/docker/ubi9/entrypoint.sh deleted file mode 100644 index d4375f8f17..0000000000 --- a/contrib/docker/ubi9/entrypoint.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -e - -sed -i 's~^user.*$~user = "firedancer"~' /opt/firedancer/config/default.toml - -exec "$@" diff --git a/contrib/docker/ubuntu2004/Dockerfile b/contrib/docker/ubuntu2004/Dockerfile deleted file mode 100644 index b00546a673..0000000000 --- a/contrib/docker/ubuntu2004/Dockerfile +++ /dev/null @@ -1,60 +0,0 @@ -# Firedancer GNU/Linux build based on Ubuntu 20.04 -# -# Build context is repo root. -# -# Not ready for production use. - -# Pin a specific image version rather than "latest" to avoid introducing issues with updates -# Ubuntu 20.04 -ARG BUILDER_BASE_IMAGE=ubuntu@sha256:a4fab1802f08df089c4b2e0a1c8f1a06f573bd1775687d07fef4076d3a2e4900 # 20.04 2024-01-23T13:01:04.825078387Z -ARG RELEASE_BASE_IMAGE=ubuntu@sha256:a4fab1802f08df089c4b2e0a1c8f1a06f573bd1775687d07fef4076d3a2e4900 # 20.04 2024-01-23T13:01:04.825078387Z - -# Set up build container -FROM ${BUILDER_BASE_IMAGE} AS builder - -RUN INSTALL_PKGS="git curl clang ca-certificates" && \ - apt update && \ - DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends ${INSTALL_PKGS} - -# Install Rust -ARG RUST_VERSION=1.73.0 -RUN /usr/bin/curl "https://sh.rustup.rs" -sfo /tmp/rustup.sh && \ - sh /tmp/rustup.sh -y --default-toolchain ${RUST_VERSION} - -ENV PATH="/root/.cargo/bin:${PATH}" - -# Fetch and build source dependencies -ENV WORKDIR=/firedancer -WORKDIR ${WORKDIR} - -# Default can be overridden on commandline or in docker-compose file -ARG MACHINE=linux_gcc_x86_64 -ARG GITTAG -RUN git clone --recurse-submodules https://github.com/firedancer-io/firedancer.git ${WORKDIR} && \ - [ -n ${GITTAG} ] && git checkout ${GITTAG} && \ - FD_AUTO_INSTALL_PACKAGES=1 DEBIAN_FRONTEND=noninteractive ./deps.sh fetch check install && \ - MACHINE=${MACHINE} make -j all rust --output-sync=target && \ - cp -a $(find build -type d -name bin) build/out - -# Set up release container -FROM ${RELEASE_BASE_IMAGE} AS release - -RUN useradd firedancer && \ - apt update && \ - DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends bzip2 - - -COPY --from=builder /firedancer/build/out /opt/firedancer/bin -COPY --from=builder /firedancer/src/app/fdctl/config /opt/firedancer/config -COPY --chmod=555 entrypoint.sh / - -ENV FD_LOG_PATH="/opt/firedancer/log" -ENV PATH="/opt/firedancer/bin:$PATH" - -ENTRYPOINT [ "/entrypoint.sh" ] -CMD [ "/bin/bash" ] - -LABEL org.opencontainers.image.title="Firedancer (Ubuntu 20.04 base)" \ - org.opencontainers.image.url=https://firedancer.io \ - org.opencontainers.image.source=https://github.com/firedancer-io/firedancer \ - org.opencontainers.image.authors="Firedancer Contributors " diff --git a/contrib/docker/ubuntu2004/docker-compose.yml b/contrib/docker/ubuntu2004/docker-compose.yml deleted file mode 100644 index 417901e7e7..0000000000 --- a/contrib/docker/ubuntu2004/docker-compose.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -version: "3.8" -services: - firedancer: - image: firedancer_ubuntu2004:latest -# increment this if building a new version - image: firedancer_ubuntu2004:0.1 - volumes: - - /data/firedancer:/home/firedancer/.firedancer:Z - - /data/firedancer/log:/opt/firedancer/log:Z - ipc: host - network_mode: "host" - privileged: true - command: fddev --config /opt/firedancer/config/default.toml dev - build: - context: . - args: -# Defaults provided both here and in Dockerfile. This will override values in Dockerfile. - BUILDER_BASE_IMAGE: ubuntu@sha256:a4fab1802f08df089c4b2e0a1c8f1a06f573bd1775687d07fef4076d3a2e4900 - RELEASE_BASE_IMAGE: ubuntu@sha256:a4fab1802f08df089c4b2e0a1c8f1a06f573bd1775687d07fef4076d3a2e4900 - MACHINE: linux_gcc_x86_64 - RUST_VERSION: 1.73.0 -# We can define a release, tag, or branch rather than main. Defaults to main if undefined. - GITTAG: diff --git a/contrib/docker/ubuntu2004/entrypoint.sh b/contrib/docker/ubuntu2004/entrypoint.sh deleted file mode 100644 index d4375f8f17..0000000000 --- a/contrib/docker/ubuntu2004/entrypoint.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -e - -sed -i 's~^user.*$~user = "firedancer"~' /opt/firedancer/config/default.toml - -exec "$@" diff --git a/contrib/docker/ubuntu2204/README.md b/contrib/docker/ubuntu2204/README.md deleted file mode 100644 index 649e5cce0f..0000000000 --- a/contrib/docker/ubuntu2204/README.md +++ /dev/null @@ -1,2 +0,0 @@ -We don't need a separate Dockerfile or entrypoint since it's the same between Ubuntu 20.04 and 22.04. -Set the context to ../ubuntu2004 and different base image and off we go. diff --git a/contrib/docker/ubuntu2204/docker-compose.yml b/contrib/docker/ubuntu2204/docker-compose.yml deleted file mode 100644 index 960773ad45..0000000000 --- a/contrib/docker/ubuntu2204/docker-compose.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -version: "3.8" -services: - firedancer: - image: firedancer_ubuntu2204:latest -# increment this if building a new version - image: firedancer_ubuntu2204:0.1 - volumes: - - /data/firedancer:/home/firedancer/.firedancer:Z - - /data/firedancer/log:/opt/firedancer/log:Z - ipc: host - network_mode: "host" - privileged: true - command: fddev --config /opt/firedancer/config/default.toml dev - build: - context: ../ubuntu2004 - args: -# Defaults provided both here and in Dockerfile. This will override values in Dockerfile. - BUILDER_BASE_IMAGE: ubuntu@sha256:bcc511d82482900604524a8e8d64bf4c53b2461868dac55f4d04d660e61983cb #22.04 2024-01-25T17:54:41.023950033Z - RELEASE_BASE_IMAGE: ubuntu@sha256:bcc511d82482900604524a8e8d64bf4c53b2461868dac55f4d04d660e61983cb #22.04 2024-01-25T17:54:41.023950033Z - MACHINE: linux_gcc_x86_64 - RUST_VERSION: 1.73.0 -# We can define a release, tag, or branch rather than main. Defaults to main if undefined. - GITTAG: