To be honest, I am not sure what issues I can meet there, because it will be one image for the last FROM directive.
FROM
But the binary is compiled on golang:1.8.1 which is Jessie I believe. I think it would be safer to have FROM golang:1.8.1-alpine for the first stage and FROM alpine:3.5 for the second one. (golang:1.8.1-alpine is from alpine:3.5)
golang:1.8.1
FROM golang:1.8.1-alpine
FROM alpine:3.5
golang:1.8.1-alpine
alpine:3.5
A static build can save you.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
To be honest, I am not sure what issues I can meet there, because it will be one image for the last
FROM
directive.But the binary is compiled on
golang:1.8.1
which is Jessie I believe. I think it would be safer to haveFROM golang:1.8.1-alpine
for the first stage andFROM alpine:3.5
for the second one. (golang:1.8.1-alpine
is fromalpine:3.5
)A static build can save you.