Initial Commit to Add RestAPI Server to IEC
[iec.git] / src / foundation / api / docker / Dockerfile.golang
1 ARG TAG=latest
2 ARG IMAGEBASE=iecedge/iec-apiserver-base
3 ARG IMAGEFROM=${IMAGEBASE}:${TAG}
4 FROM ${IMAGEFROM} as builder
5 ADD ./apiserver $GOPATH/src/apiserver
6 RUN revel package apiserver -m prod && \
7     mkdir -p /opt/apiserver && \
8     tar xf $GOPATH/src/apiserver/apiserver.tar.gz -C /opt/apiserver
9
10 FROM ubuntu:18.04
11 COPY --from=builder /opt/apiserver /opt/apiserver
12 ENTRYPOINT ["/opt/apiserver/run.sh"]