mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-06 16:19:49 -06:00
48 lines
1.3 KiB
Plaintext
48 lines
1.3 KiB
Plaintext
FROM --platform=linux/amd64 ubuntu:18.04
|
|
|
|
# install peewee
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
RUN apt update -y && \
|
|
apt install -y \
|
|
curl \
|
|
gnupg \
|
|
software-properties-common && \
|
|
curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
|
|
apt update -y && \
|
|
apt install -y \
|
|
python3.8 \
|
|
python3-pip \
|
|
git \
|
|
mysql-client \
|
|
libmysqlclient-dev \
|
|
bats && \
|
|
update-ca-certificates -f
|
|
|
|
# install go
|
|
WORKDIR /root
|
|
ENV GO_VERSION=1.19
|
|
ENV GOPATH=$HOME/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
|
|
|
|
# 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"]
|