Skip to content

Commit

Permalink
/docker/{Dockerfile,serverDockerfile}: change dolt installation to us…
Browse files Browse the repository at this point in the history
…e install script which can determine platform
  • Loading branch information
coffeegoddd committed Jul 11, 2024
1 parent 00add71 commit db2efff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
12 changes: 6 additions & 6 deletions docker/serverDockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit db2efff

Please sign in to comment.