/docker/{Dockerfile,serverDockerfile}: change dolt installation to use install script which can determine platform

This commit is contained in:
coffeegoddd
2024-07-11 14:33:14 -07:00
parent 00add7184c
commit db2efff9ce
2 changed files with 12 additions and 12 deletions

View File

@@ -1,20 +1,20 @@
# syntax=docker/dockerfile:1.3-labs
FROM --platform=$BUILDPLATFORM ubuntu:22.04
FROM ubuntu:22.04
ARG DOLT_VERSION
ARG BUILDARCH
RUN apt update -y && \
apt install -y \
curl \
tini \
ca-certificates && \
apt clean && \
rm -rf /var/lib/apt/lists/*
ADD https://github.com/dolthub/dolt/releases/download/v${DOLT_VERSION}/dolt-linux-${BUILDARCH}.tar.gz dolt-linux-${BUILDARCH}.tar.gz
RUN tar zxvf dolt-linux-${BUILDARCH}.tar.gz && \
cp dolt-linux-${BUILDARCH}/bin/dolt /usr/local/bin && \
rm -rf dolt-linux-${BUILDARCH} dolt-linux-${BUILDARCH}.tar.gz
# we install dolt with the install.sh script, which will determine the platform/arch of the container
# and install the proper dolt binary
RUN bash -c 'curl -L https://github.com/dolthub/dolt/releases/download/v${DOLT_VERSION}/install.sh | bash'
RUN /usr/local/bin/dolt version
WORKDIR /var/lib/dolt
ENTRYPOINT ["tini", "--", "/usr/local/bin/dolt"]

View File

@@ -1,20 +1,20 @@
# syntax=docker/dockerfile:1.3-labs
FROM --platform=$BUILDPLATFORM ubuntu:22.04
FROM ubuntu:22.04
ARG DOLT_VERSION
ARG BUILDARCH
RUN apt update -y && \
apt install -y \
curl \
tini \
ca-certificates && \
apt clean && \
rm -rf /var/lib/apt/lists/*
ADD https://github.com/dolthub/dolt/releases/download/v${DOLT_VERSION}/dolt-linux-${BUILDARCH}.tar.gz dolt-linux-${BUILDARCH}.tar.gz
RUN tar zxvf dolt-linux-${BUILDARCH}.tar.gz && \
cp dolt-linux-${BUILDARCH}/bin/dolt /usr/local/bin && \
rm -rf dolt-linux-${BUILDARCH} dolt-linux-${BUILDARCH}.tar.gz
# we install dolt with the install.sh script, which will determine the platform/arch of the container
# and install the proper dolt binary
RUN bash -c 'curl -L https://github.com/dolthub/dolt/releases/download/v${DOLT_VERSION}/install.sh | bash'
RUN /usr/local/bin/dolt version
RUN mkdir /docker-entrypoint-initdb.d
VOLUME /var/lib/dolt