Foreman-Gateway/Dockerfile

21 lines
451 B
Text
Raw Permalink Normal View History

2021-06-28 15:08:56 +08:00
FROM library/golang
# Godep for vendoring
2022-06-03 16:06:32 +08:00
RUN go install github.com/tools/godep@latest
2021-06-28 15:08:56 +08:00
# Recompile the standard library without CGO
RUN CGO_ENABLED=0 go install -a std
ENV APP_DIR $GOPATH/home/fish/Foreman-Gateway
RUN mkdir -p $APP_DIR
# Set the entrypoint
ENTRYPOINT (cd $APP_DIR && ./Foreman-Gateway)
ADD . $APP_DIR
# Compile the binary and statically link
RUN cd $APP_DIR && CGO_ENABLED=0 go build -ldflags '-d -w -s'
EXPOSE 8080
2022-06-03 16:05:09 +08:00
EXPOSE 8088