mirror of
https://github.com/vbatts/imgsrv.git
synced 2024-12-24 14:56:30 +00:00
small container build
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
3c732c3b43
commit
7fac419675
1 changed files with 11 additions and 8 deletions
19
Dockerfile
19
Dockerfile
|
@ -1,11 +1,14 @@
|
|||
FROM fedora
|
||||
EXPOSE 7777
|
||||
ENV GOPATH /usr/local
|
||||
FROM golang as build
|
||||
|
||||
WORKDIR /go/src/github.com/vbatts/imgsrv
|
||||
COPY . .
|
||||
RUN go install -tags netgo github.com/vbatts/imgsrv
|
||||
|
||||
FROM busybox as prod
|
||||
ENV MONGODB_DATABASE filesrv
|
||||
ENV MONGODB_SERVICE_HOST 127.0.0.1
|
||||
ENV MONGODB_SERVICE_PORT 27017
|
||||
RUN dnf install -y golang git bzr && \
|
||||
go get github.com/vbatts/imgsrv && \
|
||||
rm -rf /usr/local/pkg && \
|
||||
dnf remove -y golang git bzr
|
||||
ENTRYPOINT ["/bin/sh", "/usr/local/src/github.com/vbatts/imgsrv/run.sh"]
|
||||
EXPOSE 7777
|
||||
COPY --from=build /go/bin/imgsrv /usr/local/bin/imgsrv
|
||||
COPY --from=build /go/src/github.com/vbatts/imgsrv/run.sh /usr/local/bin/run.sh
|
||||
ENTRYPOINT ["/bin/sh", "/usr/local/bin/run.sh"]
|
||||
|
|
Loading…
Reference in a new issue