forked from StepicOrg/epicbox-images
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HSPC-171: added building hyperstyle image from the dev branch hyperst…
…yle repository (#126) * added building hyperstyle image from the dev branch hyperstyle repository * fix * fix * added Dockerfile for hyperstyle * added go.mod go.sum main.go into the local directory
1 parent
ed8aa93
commit 693334c
Showing
5 changed files
with
140 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
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,69 @@ | ||
FROM stepik/hyperstyle-base:py3.8.11-java11.0.11-node14.17.3-go1.18.5 | ||
|
||
ENV ESLINT_VERSION 7.5.0 | ||
|
||
ENV LINTERS_DIRECTORY /opt/linters | ||
|
||
ENV CHECKSTYLE_VERSION 8.44 | ||
ENV CHECKSTYLE_DIRECTORY ${LINTERS_DIRECTORY}/checkstyle | ||
|
||
ENV DETEKT_VERSION 1.14.2 | ||
ENV DETEKT_DIRECTORY ${LINTERS_DIRECTORY}/detekt | ||
|
||
ENV PMD_VERSION 6.37.0 | ||
ENV PMD_DIRECTORY ${LINTERS_DIRECTORY}/pmd | ||
|
||
ENV GOLANG_LINT_VERSION 1.49.0 | ||
ENV GOLANG_LINT_DIRECTORY ${LINTERS_DIRECTORY}/golangci-lint | ||
|
||
RUN apt-get update && apt-get install -y build-essential libssl-dev libffi-dev python3-dev git | ||
|
||
RUN git clone --branch develop https://github.com/hyperskill/hyperstyle.git /review | ||
|
||
RUN mkdir -p ${CHECKSTYLE_DIRECTORY} && \ | ||
mkdir -p ${DETEKT_DIRECTORY} && \ | ||
mkdir -p ${PMD_DIRECTORY} && \ | ||
mkdir -p ${GOLANG_LINT_DIRECTORY} | ||
|
||
# Install Curl and Unzip | ||
RUN apt -y update && \ | ||
apt -y upgrade && \ | ||
apt -y install curl unzip | ||
|
||
# Install eslint | ||
RUN npm install eslint@${ESLINT_VERSION} -g && \ | ||
eslint --init | ||
|
||
# Install Detekt and Detekt-formatting | ||
RUN curl -sSLO https://github.com/detekt/detekt/releases/download/v${DETEKT_VERSION}/detekt-cli-${DETEKT_VERSION}.zip && \ | ||
unzip detekt-cli-${DETEKT_VERSION}.zip -d ${DETEKT_DIRECTORY} && \ | ||
curl -H "Accept: application/zip" https://repo.maven.apache.org/maven2/io/gitlab/arturbosch/detekt/detekt-formatting/${DETEKT_VERSION}/detekt-formatting-${DETEKT_VERSION}.jar -o ${DETEKT_DIRECTORY}/detekt-formatting-${DETEKT_VERSION}.jar | ||
|
||
# Install Checkstyle | ||
RUN curl -L https://github.com/checkstyle/checkstyle/releases/download/checkstyle-${CHECKSTYLE_VERSION}/checkstyle-${CHECKSTYLE_VERSION}-all.jar > ${CHECKSTYLE_DIRECTORY}/checkstyle-${CHECKSTYLE_VERSION}-all.jar | ||
|
||
# Install PMD | ||
RUN curl -sSLO https://github.com/pmd/pmd/releases/download/pmd_releases/${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \ | ||
unzip pmd-bin-${PMD_VERSION}.zip -d ${PMD_DIRECTORY} | ||
|
||
# Install golangci-lint | ||
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \ | ||
sh -s -- -b ${GOLANG_LINT_DIRECTORY} v${GOLANG_LINT_VERSION} | ||
|
||
# Install third party golang libraries and pre-cache them by compiling main.go | ||
COPY go.mod go.sum main.go ./ | ||
|
||
RUN go mod download && \ | ||
go mod verify && \ | ||
go mod tidy && \ | ||
go run main.go && \ | ||
rm main.go && \ | ||
chmod ugo-w go.mod go.sum | ||
|
||
RUN pip install -r ./review/requirements-build.txt --verbose | ||
RUN pip install -r ./review/requirements.txt --verbose | ||
RUN pip install -r ./review/requirements-test.txt --verbose | ||
|
||
RUN pip install ./review --use-feature=in-tree-build | ||
|
||
CMD ["/bin/bash"] |
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,15 @@ | ||
module main | ||
|
||
go 1.18 | ||
|
||
require ( | ||
github.com/jmoiron/sqlx v1.3.5 | ||
github.com/mattn/go-sqlite3 v1.14.13 | ||
gorm.io/driver/sqlite v1.3.2 | ||
gorm.io/gorm v1.23.5 | ||
) | ||
|
||
require ( | ||
github.com/jinzhu/inflection v1.0.0 // indirect | ||
github.com/jinzhu/now v1.1.5 // indirect | ||
) |
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,31 @@ | ||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | ||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= | ||
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= | ||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= | ||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= | ||
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= | ||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= | ||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= | ||
github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= | ||
github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= | ||
github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= | ||
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= | ||
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= | ||
github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= | ||
github.com/mattn/go-sqlite3 v1.14.13 h1:1tj15ngiFfcZzii7yd82foL+ks+ouQcj8j/TPq3fk1I= | ||
github.com/mattn/go-sqlite3 v1.14.13/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= | ||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | ||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | ||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | ||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= | ||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | ||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= | ||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||
gorm.io/driver/sqlite v1.3.2 h1:nWTy4cE52K6nnMhv23wLmur9Y3qWbZvOBz+V4PrGAxg= | ||
gorm.io/driver/sqlite v1.3.2/go.mod h1:B+8GyC9K7VgzJAcrcXMRPdnMcck+8FgJynEehEPM16U= | ||
gorm.io/gorm v1.23.4/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= | ||
gorm.io/gorm v1.23.5 h1:TnlF26wScKSvknUC/Rn8t0NLLM22fypYBlvj1+aH6dM= | ||
gorm.io/gorm v1.23.5/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= |
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,11 @@ | ||
package main | ||
|
||
import ( | ||
_ "github.com/jmoiron/sqlx" | ||
_ "github.com/mattn/go-sqlite3" | ||
_ "gorm.io/driver/sqlite" | ||
_ "gorm.io/gorm" | ||
) | ||
|
||
func main() { | ||
} |