github.com/midokura/kubeedge@v1.2.0-mido.0/build/edgesite/Dockerfile (about)

     1  ARG BUILD_FROM=golang:1.12-alpine3.10
     2  ARG RUN_FROM=docker:dind
     3  
     4  FROM ${BUILD_FROM} AS builder
     5  
     6  ARG QEMU_ARCH=x86_64
     7  COPY ./build/edgesite/tmp/qemu-${QEMU_ARCH}-static /usr/bin/
     8  COPY . /go/src/github.com/kubeedge/kubeedge
     9  
    10  RUN apk --no-cache update && \
    11  apk --no-cache upgrade && \
    12  apk --no-cache add build-base linux-headers sqlite-dev && \
    13  CGO_ENABLED=1 go build -v -o /usr/local/bin/edgesite -ldflags="-w -s -extldflags -static" \
    14  github.com/kubeedge/kubeedge/edgesite/cmd/edgesite
    15  
    16  FROM ${RUN_FROM}
    17  
    18  COPY --from=builder /usr/bin/qemu* /usr/bin/
    19  
    20  ENV GOARCHAIUS_CONFIG_PATH /etc/kubeedge/edgesite
    21  ENV database.source /var/lib/kubeedge/edge.db
    22  
    23  VOLUME ["/etc/kubeedge/certs", "/var/lib/edged", "/var/lib/kubeedge", "/var/run/docker.sock"]
    24  
    25  COPY --from=builder /usr/local/bin/edgesite /usr/local/bin/edgesite
    26  
    27  ENTRYPOINT ["edgesite"]