Docker: Upgraded Go, TensorFlow and TiDB

This commit is contained in:
Michael Mayer 2019-04-18 06:33:34 +02:00
parent 8d73d38246
commit c157020dca
6 changed files with 18 additions and 17 deletions

View File

@ -1,5 +1,5 @@
FROM photoprism/development:20181219
FROM photoprism/development:20190418
# Set up project directory
WORKDIR "/go/src/github.com/photoprism/photoprism"
COPY . .
COPY . .

View File

@ -2,7 +2,7 @@ export GO111MODULE=on
GOIMPORTS=goimports
BINARY_NAME=photoprism
DOCKER_TAG=`date -u +%Y%m%d`
TIDB_VERSION=2.1.1
TIDB_VERSION=2.1.8
DARKTABLE_VERSION="$(awk '$2 == "DARKTABLE_VERSION" { print $3; exit }' docker/darktable/Dockerfile)"
all: download dep js build
@ -70,4 +70,4 @@ dep:
go build -v ./...
upgrade:
go mod tidy
go get -u
go get -u

View File

@ -46,7 +46,7 @@ RUN add-apt-repository ppa:pmjdebruijn/darktable-release && \
# Install TensorFlow C library
RUN curl -L \
"https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz" | \
"https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.13.1.tar.gz" | \
tar -C "/usr/local" -xz
RUN ldconfig
@ -66,12 +66,12 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install Go
ENV GOLANG_VERSION 1.11.4
ENV GOLANG_VERSION 1.12.4
RUN set -eux; \
\
url="https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz"; \
wget -O go.tgz "$url"; \
echo "fb26c30e6a04ad937bbc657a1b5bba92f80096af1e8ee6da6430c045a8db3a5b *go.tgz" | sha256sum -c -; \
echo "d7d1f1f88ddfe55840712dc1747f37a790cbcaa448f6c9cf51bbe10aa65442f5 *go.tgz" | sha256sum -c -; \
tar -C /usr/local -xzf go.tgz; \
rm go.tgz; \
export PATH="/usr/local/go/bin:$PATH"; \
@ -110,4 +110,4 @@ EXPOSE 4000
EXPOSE 8080
# Keep container running (services can be started manually using a terminal)
CMD tail -f /dev/null
CMD tail -f /dev/null

View File

@ -1,4 +1,4 @@
FROM photoprism/development:20181219 as build
FROM photoprism/development:20190418 as build
# Set up project directory
WORKDIR "/go/src/github.com/photoprism/photoprism"
@ -50,4 +50,4 @@ EXPOSE 80
EXPOSE 4000
# Start PhotoPrism server
CMD photoprism start
CMD photoprism start

View File

@ -1,4 +1,4 @@
FROM photoprism/development:20181112
FROM photoprism/development:20190418
# Install Python and TensorFlow
RUN apt-get update && apt-get install -y --no-install-recommends \
@ -38,4 +38,4 @@ COPY . .
RUN make all install
# Start PhotoPrism server
CMD photoprism start
CMD photoprism start

View File

@ -1,13 +1,14 @@
# Builder image
FROM golang:1.11.4-alpine as builder
FROM golang:1.12.4-alpine as builder
ENV TIDB_VERSION 2.1.1
ENV TIDB_VERSION 2.1.8
RUN apk add --no-cache \
wget \
make \
git \
unzip
g++ \
gcc
RUN git clone https://github.com/pingcap/tidb.git /go/src/github.com/pingcap/tidb
@ -16,7 +17,7 @@ WORKDIR /go/src/github.com/pingcap/tidb/
RUN git checkout tags/v$TIDB_VERSION && rm go.sum && GO111MODULE=on go mod tidy && make
# Executable image
FROM alpine:3.8
FROM alpine:3.9
COPY --from=builder /go/src/github.com/pingcap/tidb/bin/tidb-server /usr/local/bin/tidb-server
@ -36,4 +37,4 @@ EXPOSE 4000
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["/usr/local/bin/tidb-server"]
CMD ["/usr/local/bin/tidb-server"]