1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

update docker

This commit is contained in:
Zack Scholl 2018-07-31 12:56:00 -07:00
parent d43cc80b53
commit e5a1a88a02

View File

@ -1,15 +1,16 @@
# First build step
FROM golang:1.10-alpine as builder
WORKDIR /go/src/cowyo
COPY . .
#WORKDIR /go/src/github.com/schollz/cowyo
#COPY . .
# Disable crosscompiling
ENV CGO_ENABLED=0
# Install git and make, compile and cleanup
RUN apk add --no-cache git make \
&& go get -u github.com/schollz/cowyo \
&& go get -u github.com/jteeuwen/go-bindata/... \
&& go get -u -v github.com/jteeuwen/go-bindata/... \
&& go get -u -v -d github.com/schollz/cowyo \
&& cd /go/src/github.com/schollz/cowyo \
&& make \
&& apk del --purge git make \
&& rm -rf /var/cache/apk*
@ -17,7 +18,7 @@ RUN apk add --no-cache git make \
# Second build step uses the minimal scratch Docker image
FROM scratch
# Copy the binary from the first step
COPY --from=builder /go/src/cowyo/cowyo /usr/local/bin/cowyo
COPY --from=builder /go/src/github.com/schollz/cowyo/cowyo /usr/local/bin/cowyo
# Expose data folder
VOLUME /data
EXPOSE 8050