forked from snowzach/doods
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.builder
29 lines (23 loc) · 968 Bytes
/
Dockerfile.builder
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
ARG BUILDER_TAG="latest"
FROM registry.prozach.org/doods-base:$BUILDER_TAG as base
# Install Go
ENV GO_VERSION "1.13.3"
RUN curl -kLo go${GO_VERSION}.linux-${GO_ARCH}.tar.gz https://dl.google.com/go/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz && \
tar -C /usr/local -xzf go${GO_VERSION}.linux-${GO_ARCH}.tar.gz && \
rm go${GO_VERSION}.linux-${GO_ARCH}.tar.gz
FROM debian:buster-slim as build
RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config zip zlib1g-dev unzip wget bash-completion git curl \
build-essential patch g++ python python-future python3 ca-certificates \
libc6-dev libstdc++6 libusb-1.0-0
# Copy all libraries, includes and go
COPY --from=base /usr/local/. /usr/local/.
COPY --from=base /opt/tensorflow /opt/tensorflow
ENV GOOS=linux
ENV CGO_ENABLED=1
ENV CGO_CFLAGS=-I/opt/tensorflow
ENV PATH /usr/local/go/bin:/go/bin:${PATH}
ENV GOPATH /go
# Create the build directory
RUN mkdir /build
WORKDIR /build