Add HW 3
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM docker:dind
|
||||
|
||||
RUN apk add --no-cache bash ca-certificates go wget
|
||||
|
||||
WORKDIR /hw
|
||||
COPY go.mod go.sum tests/
|
||||
RUN --mount=type=cache,id=distsys-course-go-mod,target=/go/pkg/mod,sharing=locked \
|
||||
cd tests && go mod download
|
||||
COPY . tests
|
||||
RUN --mount=type=cache,id=distsys-course-go-mod,target=/go/pkg/mod,sharing=locked \
|
||||
--mount=type=cache,id=distsys-course-go-build,target=/root/.cache/go-build,sharing=locked \
|
||||
cd tests && go test -c -o /usr/local/bin/hw3test .
|
||||
COPY entrypoint.sh /usr/local/bin/
|
||||
COPY verify-zram-scratch.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh /usr/local/bin/verify-zram-scratch.sh
|
||||
|
||||
ENTRYPOINT ["timeout", "-k", "10", "600", "entrypoint.sh"]
|
||||
Reference in New Issue
Block a user