-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# go lint tool dependencies `go list` `gofmt` | ||
FROM golang:1.23.2-alpine3.20 | ||
#FROM aslan-spock-register.qiniu.io/golang:1.23.2-alpine3.20 | ||
ENV GOPROXY https://goproxy.cn,direct | ||
ENV TimeZone=Asia/Shanghai | ||
# if you want to install other tools, please add them here. | ||
# Do not install unnecessary tools to reduce image size. | ||
RUN set -eux \ | ||
apk update && \ | ||
apk --no-cache add ca-certificates git openssh yarn libpcap-dev curl openjdk11 bash build-base maven | ||
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk | ||
ENV PATH=$PATH:$JAVA_HOME/bin | ||
|
||
#RUN update-alternatives --list java | ||
|
||
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin v1.61.0 | ||
|
||
RUN mkdir source | ||
|
||
WORKDIR /source | ||
|
||
RUN git clone https://github.com/alibaba/p3c.git | ||
|
||
WORKDIR /source/p3c/p3c-pmd | ||
|
||
RUN mvn clean kotlin:compile package | ||
|
||
|
||
WORKDIR / | ||
|
||
|
||
|
||
# SSH config | ||
RUN mkdir -p /root/.ssh && chown -R root /root/.ssh/ && chgrp -R root /root/.ssh/ \ | ||
&& git config --global url."[email protected]:".insteadOf https://github.com/ \ | ||
&& git config --global url."git://".insteadOf https:// | ||
COPY deploy/config /root/.ssh/config | ||
COPY deploy/github-known-hosts /github_known_hosts | ||
|
||
# set go proxy and private repo | ||
RUN go env -w GOPROXY=https://goproxy.cn,direct \ | ||
&& go env -w GOPRIVATE=github.com/qbox,qiniu.com | ||
|
||
EXPOSE 8888 |
This file contains 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