Selaa lähdekoodia

Merge 33c3b19ec4 into 6a6cce7c28

pull/96/merge
Valentin Ouvrard 6 vuotta sitten
committed by GitHub
vanhempi
commit
9c3ca330df
1 muutettua tiedostoa jossa 17 lisäystä ja 4 poistoa
  1. +17
    -4
      Dockerfile

+ 17
- 4
Dockerfile Näytä tiedosto

@@ -1,12 +1,25 @@
FROM golang:1.7-alpine
FROM golang as builder
MAINTAINER Remco Verhoef <remco@dutchcoders.io>

# Copy the local package files to the container's workspace.
ADD . /go/src/github.com/dutchcoders/transfer.sh
WORKDIR /go/src/github.com/dutchcoders/transfer.sh

# build & install server
RUN go build -o /go/bin/transfersh github.com/dutchcoders/transfer.sh
# build binarie
RUN set -x && \
go get -d -v . && \
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o transfersh .

ENTRYPOINT ["/go/bin/transfersh", "--listener", ":8080", "--provider", "s3"]
# Take an empty container
FROM scratch

WORKDIR /root/

# Copy the binarie
RUN set -x && \
COPY --from=builder /go/src/github.com/dutchcoders/transfer.sh/transfersh .

EXPOSE 8080 8080

# Entrypoint to launch properly the container
ENTRYPOINT ["/root/transfersh"]

Ladataan…
Peruuta
Tallenna