You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-07-01 00:55:01 +02:00
Imported github.com/ardanlabs/service as base example project
This commit is contained in:
31
example-project/dockerfile
Normal file
31
example-project/dockerfile
Normal file
@ -0,0 +1,31 @@
|
||||
# Build the Go Binary.
|
||||
|
||||
FROM golang:1.12.1 as build
|
||||
ENV CGO_ENABLED 0
|
||||
ARG VCS_REF
|
||||
ARG PACKAGE_NAME
|
||||
ARG PACKAGE_PREFIX
|
||||
RUN mkdir -p /go/src/geeks-accelerator/oss/saas-starter-kit/example-project
|
||||
COPY . /go/src/geeks-accelerator/oss/saas-starter-kit/example-project
|
||||
WORKDIR /go/src/geeks-accelerator/oss/saas-starter-kit/example-project/cmd/${PACKAGE_PREFIX}${PACKAGE_NAME}
|
||||
RUN go build -ldflags "-s -w -X main.build=${VCS_REF}" -a -tags netgo
|
||||
|
||||
|
||||
# Run the Go Binary in Alpine.
|
||||
|
||||
FROM alpine:3.7
|
||||
ARG BUILD_DATE
|
||||
ARG VCS_REF
|
||||
ARG PACKAGE_NAME
|
||||
ARG PACKAGE_PREFIX
|
||||
COPY --from=build /go/src/geeks-accelerator/oss/saas-starter-kit/example-project/cmd/${PACKAGE_PREFIX}${PACKAGE_NAME}/${PACKAGE_NAME} /app/main
|
||||
COPY --from=build /go/src/geeks-accelerator/oss/saas-starter-kit/example-project/private.pem /app/private.pem
|
||||
WORKDIR /app
|
||||
CMD /app/main
|
||||
|
||||
LABEL org.opencontainers.image.created="${BUILD_DATE}" \
|
||||
org.opencontainers.image.title="${PACKAGE_NAME}" \
|
||||
org.opencontainers.image.authors="William Kennedy <bill@ardanlabs.com>" \
|
||||
org.opencontainers.image.source="https://geeks-accelerator/oss/saas-starter-kit/example-project/cmd/${PACKAGE_PREFIX}${PACKAGE_NAME}" \
|
||||
org.opencontainers.image.revision="${VCS_REF}" \
|
||||
org.opencontainers.image.vendor="Ardan Labs"
|
Reference in New Issue
Block a user