[go-nuts] Creating Go web server into small Docker images

2019-05-04 Thread nanmu42
You may refer to this gist: https://gist.github.com/nanmu42/90bf2d3870b64aec20b68ec3c104a610 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr

[go-nuts] Creating Go web server into small Docker images

2019-05-04 Thread suntong001
Hi, I'm trying to create Go web server into small Docker images. Here is my Dockerfile: # golang:latest as build-env FROM golang:latest AS build-env RUN mkdir /app ADD . /app/ WORKDIR /app RUN cd /app && GO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o myapp . # go build -o myapp