github.com/midokura/kubeedge@v1.2.0-mido.0/build/edge/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/edge/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 binutils-gold && \
    13  CGO_ENABLED=1 go build -v -o /usr/local/bin/edgecore -ldflags="-w -s -extldflags -static" \
    14  github.com/kubeedge/kubeedge/edge/cmd/edgecore
    15  
    16  FROM ${RUN_FROM}
    17  
    18  LABEL maintainer="zhanghongtong <zhanghongtong@foxmail.com>"
    19  
    20  COPY --from=builder /usr/bin/qemu* /usr/bin/
    21  
    22  ENV GOARCHAIUS_CONFIG_PATH /etc/kubeedge/edge
    23  ENV database.source /var/lib/kubeedge/edge.db
    24  
    25  VOLUME ["/etc/kubeedge/certs", "/var/lib/edged", "/var/lib/kubeedge", "/var/run/docker.sock"]
    26  
    27  COPY --from=builder /usr/local/bin/edgecore /usr/local/bin/edgecore
    28  
    29  ENTRYPOINT ["edgecore"]