Created
November 23, 2019 16:34
-
-
Save ducmeit1/7b1e6157b22cbd4cb1cb81759b68e9fa to your computer and use it in GitHub Desktop.
Dockerfile uses for build aws lambda deployment
This file contains hidden or 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
FROM golang:1.12.13 | |
#Install zip package to using zip | |
RUN DEBIAN_FRONTEND=noninteractive \ | |
apt-get update && \ | |
apt-get install --no-install-recommends -y \ | |
zip | |
#Copy all project to src directory of default GOPATH address with name of project | |
COPY . /go/src/simple-go-lambda | |
#CD to simple-go-lambda folder by set WORKDIR | |
WORKDIR /go/src/simple-go-lambda | |
#RUN Makefile with test first, and build right after | |
RUN make test && make build | |
#We can copy the build.zip file to the root path / and chmod to 755 | |
RUN mv build.zip / && chmod 755 /build.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment