mirror of
https://github.com/dolthub/dolt.git
synced 2025-12-21 11:59:41 -06:00
65 lines
2.0 KiB
Plaintext
65 lines
2.0 KiB
Plaintext
FROM --platform=${BUILDPLATFORM} ubuntu:20.04
|
|
|
|
# install ORM tools and dependencies
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
RUN apt update -y && \
|
|
apt install -y \
|
|
curl \
|
|
gnupg \
|
|
software-properties-common && \
|
|
curl -sL https://deb.nodesource.com/setup_22.x | bash -
|
|
RUN apt update -y && \
|
|
apt install -y \
|
|
nodejs \
|
|
python3.9 \
|
|
python3-pip \
|
|
git \
|
|
mysql-client \
|
|
libmysqlclient-dev \
|
|
# weird issue: installing openjdk-17-jdk errors if `maven` or possibly any other package is not installed after it
|
|
openjdk-17-jdk \
|
|
# currently, `apt install maven` installs v3.6.0 which does not work with openjdk-17-jdk
|
|
maven \
|
|
bats && \
|
|
update-ca-certificates -f
|
|
|
|
# install go
|
|
WORKDIR /root
|
|
ENV GO_VERSION=1.25.0
|
|
ENV GOPATH=/go
|
|
ENV PATH=$PATH:$GOPATH/bin
|
|
ENV PATH=$PATH:$GOPATH/bin:/usr/local/go/bin
|
|
RUN curl -O "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" && \
|
|
sha256sum "go${GO_VERSION}.linux-amd64.tar.gz" && \
|
|
tar -xvf "go${GO_VERSION}.linux-amd64.tar.gz" -C /usr/local && \
|
|
chown -R root:root /usr/local/go && \
|
|
mkdir -p $HOME/go/{bin,src} && \
|
|
go version
|
|
|
|
# install mysql connector and pymsql
|
|
RUN pip3 install mysql-connector-python PyMySQL sqlalchemy
|
|
|
|
# Setup JAVA_HOME -- useful for docker commandline
|
|
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/
|
|
|
|
# install the current latest maven version, `v3.9.11`, because apt installed one does not work with jdk 17
|
|
ADD https://dlcdn.apache.org/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz apache-maven-3.9.11-bin.tar.gz
|
|
RUN tar zxvf apache-maven-3.9.11-bin.tar.gz && \
|
|
cp -r apache-maven-3.9.11 /opt && \
|
|
rm -rf apache-maven-3.9.11 apache-maven-3.9.11-bin.tar.gz
|
|
|
|
# add maven binary
|
|
ENV PATH=/opt/apache-maven-3.9.11/bin:$PATH
|
|
|
|
# install dolt from source
|
|
WORKDIR /root/building
|
|
COPY ./go .
|
|
ENV GOFLAGS="-mod=readonly"
|
|
RUN go build -o /usr/local/bin/dolt ./cmd/dolt
|
|
|
|
COPY orm-tests /orm-tests
|
|
COPY orm-tests/orm-tests-entrypoint.sh /orm-tests/entrypoint.sh
|
|
|
|
WORKDIR /orm-tests
|
|
ENTRYPOINT ["/orm-tests/entrypoint.sh"]
|