forked from sql-machine-learning/sqlflow
/
Dockerfile.dev
45 lines (35 loc) · 1.45 KB
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y git
RUN apt-get install -y wget curl
RUN apt-get install -y python3-pip
RUN pip3 install --upgrade pip
RUN pip3 install grpcio-tools
RUN pip3 install tensorflow
RUN pip3 install mysql-connector-python
RUN wget --quiet https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go1.11.5.linux-amd64.tar.gz
RUN rm go1.11.5.linux-amd64.tar.gz
ENV PATH $PATH:/usr/local/go/bin
RUN wget --quiet https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip
RUN apt-get install -y unzip
RUN unzip -qq protoc-3.6.1-linux-x86_64.zip -d /usr/local
RUN rm protoc-3.6.1-linux-x86_64.zip
RUN mkdir -p /go
ENV GOPATH /go
RUN go get github.com/golang/protobuf/protoc-gen-go
RUN mv /go/bin/protoc-gen-go /usr/local/bin/
RUN apt-get install -y sqlite3 libsqlite3-dev
# install mysql without a password prompt
RUN ["/bin/bash", "-c", "debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'"]
RUN ["/bin/bash", "-c", "debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'"]
RUN apt-get -y install mysql-server
VOLUME /var/lib/mysql
RUN echo "#!/bin/bash" > /build.sh
RUN echo "go generate -v ./..." >> /build.sh
RUN echo "go install -v ./..." >> /build.sh
RUN chmod +x /build.sh
# Make python3 callable through python
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN chmod +x /usr/bin/python
CMD ["/build.sh"]