This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the official golang image to create a build artifact | |
FROM golang:1.13 as builder | |
# Create app directory | |
RUN mkdir /app | |
# Add file to /app/ | |
ADD . /app/ | |
# Build the binary | |
WORKDIR /app | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . | |
# Run service on container startup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the official golang image to create a build artifact | |
FROM golang:1.13 as builder | |
# Create app directory | |
RUN mkdir /app | |
# Add file to /app/ | |
ADD . /app/ | |
# Build the binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the official golang image to create a build artifact | |
FROM golang:1.13 as builder | |
# Create app directory | |
RUN mkdir /app | |
# Add file to /app/ | |
ADD . /app/ | |
# Build the binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the official golang image to create a build artifact | |
FROM golang:1.13 as builder | |
# Create app directory | |
RUN mkdir /app | |
# Add file to /app/ | |
ADD . /app/ | |
# Build the binary | |
WORKDIR /app | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . | |
# Run service on container startup |