forked from omegaup/quark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.build
26 lines (20 loc) · 1.15 KB
/
Dockerfile.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM omegaup/quark-prebuild
# Copy the local package files to the container's workspace.
ADD . /go/src/github.com/omegaup/quark
# Build all binaries.
ENV GOOS linux
RUN go test -c github.com/omegaup/quark/common -o bin/common_test
RUN go test -c github.com/omegaup/quark/runner -o bin/runner_test
RUN go test -c github.com/omegaup/quark/grader -o bin/grader_test
RUN go build --ldflags '-extldflags "-static -lgcrypt -lgpg-error"' -o bin/grader github.com/omegaup/quark/cmd/grader
RUN go build --ldflags '-extldflags "-static"' -o bin/validator github.com/omegaup/quark/cmd/validator
ENV CGO_ENABLED 0
RUN go build --ldflags '-extldflags "-static -libc -lpthread"' -o bin/benchmark github.com/omegaup/quark/cmd/benchmark
RUN go build --ldflags '-extldflags "-static -libc -lpthread"' -o bin/runner github.com/omegaup/quark/cmd/runner
ENV GOARCH arm
ENV GOARM 7
ENV CGO_ENABLED 0
RUN go test -c github.com/omegaup/quark/common -o bin/common_test-armhf
RUN go test -c github.com/omegaup/quark/runner -o bin/runner_test-armhf
RUN go build -o bin/benchmark-armhf github.com/omegaup/quark/cmd/benchmark
RUN go build -o bin/runner-armhf github.com/omegaup/quark/cmd/runner