Skip to content

Commit

Permalink
Add Go to the image (#46)
Browse files Browse the repository at this point in the history
* Add Go to the image

Install Go so that CDK applications written in Go can be built.
  • Loading branch information
davemackintosh authored Jan 15, 2024
1 parent 4829f68 commit a76834e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ LABEL "com.github.actions.color"="yellow"

LABEL "maintainer"="Scott Brenner <[email protected]>"

RUN apk --no-cache add nodejs npm python3 py3-pip
RUN apk --no-cache add nodejs npm python3 py3-pip git make musl-dev go
RUN npm install -g aws-cdk
RUN pip3 install aws-cdk-lib --break-system-packages

# Configure Go
ENV GOROOT /usr/lib/go
ENV GOPATH /go
ENV PATH /go/bin:$PATH

RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin

COPY entrypoint.sh /entrypoint.sh
RUN ["chmod", "+x", "/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
Expand Down
1 change: 1 addition & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ if [ -f "requirements.txt" ]; then
pip3 install -r requirements.txt
fi

git config --global --add safe.directory /github/workspace
sh -c "cdk $*"

0 comments on commit a76834e

Please sign in to comment.