added publish step, and drone sig for secrets, plus dockerfile

This commit is contained in:
josebarn
2017-08-15 16:13:50 -03:00
parent 5f4a28f5f6
commit 7513414eb7
3 changed files with 31 additions and 2 deletions

23
docker/Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
# Multi-stage build form
FROM golang:latest
# Copy in code...
RUN mkdir /app
ADD main.go /app/
# Build app
WORKDIR /app
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o hello .
# Could use something even smaller...
FROM alpine:latest
RUN apk --no-cache add ca-certificates
RUN mkdir /app
WORKDIR /app/
COPY --from=0 /app/hello .
# Expose ports for future REST Interface
EXPOSE 8080
CMD ["/app/hello"]