mirror of
https://github.com/status-im/libp2p-test-plans.git
synced 2025-01-26 23:00:06 +00:00
pin deps & cleanup
This commit is contained in:
parent
25e9ebb841
commit
585886a5cb
@ -1,13 +1,20 @@
|
|||||||
ARG NimVersion="latest"
|
ARG NimVersion="1.6.10"
|
||||||
FROM nimlang/nim:${NimVersion}-alpine as builder
|
FROM nimlang/nim:${NimVersion}-alpine as builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY main.nimble .
|
COPY nim-libp2p nim-libp2p
|
||||||
RUN nim -v
|
|
||||||
RUN nimble install -dy
|
|
||||||
|
|
||||||
COPY main.nim .
|
RUN \
|
||||||
RUN nim c -d:chronicles_log_level=WARN --threads:off main.nim
|
cd nim-libp2p && \
|
||||||
|
nimble install_pinned
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
cd nim-libp2p && \
|
||||||
|
nimble install "redis@#b341fe240dbf11c544011dd0e033d3c3acca56af"
|
||||||
|
|
||||||
|
COPY main.nim main.nim
|
||||||
|
RUN \
|
||||||
|
nim c --NimblePath:nim-libp2p/nimbledeps/pkgs -p:nim-libp2p -d:chronicles_log_level=WARN --threads:off main.nim
|
||||||
|
|
||||||
ENTRYPOINT ["/app/main"]
|
ENTRYPOINT ["/app/main"]
|
||||||
|
@ -1,11 +1,29 @@
|
|||||||
image_name := nim-v1.0
|
image_name := nim-v1.0
|
||||||
|
commitSha := 408dcf12bdf44dcd6f9021a6c795c472679d6d02
|
||||||
|
|
||||||
image.json: Dockerfile main.nim
|
all: image.json
|
||||||
|
|
||||||
|
image.json: main.nim nim-libp2p Dockerfile
|
||||||
IMAGE_NAME=${image_name} ../../dockerBuildWrapper.sh .
|
IMAGE_NAME=${image_name} ../../dockerBuildWrapper.sh .
|
||||||
docker image inspect ${image_name} -f "{{.Id}}" | \
|
docker image inspect ${image_name} -f "{{.Id}}" | \
|
||||||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||||
|
|
||||||
.PHONY: clean
|
main.nim: ../mainv1.nim
|
||||||
|
cp ../mainv1.nim main.nim
|
||||||
|
|
||||||
|
nim-libp2p: nim-libp2p-${commitSha}
|
||||||
|
rm -rf nim-libp2p
|
||||||
|
ln -s nim-libp2p-${commitSha} nim-libp2p
|
||||||
|
|
||||||
|
nim-libp2p-${commitSha}: nim-libp2p-${commitSha}.zip
|
||||||
|
unzip -o nim-libp2p-${commitSha}.zip
|
||||||
|
|
||||||
|
nim-libp2p-${commitSha}.zip:
|
||||||
|
wget -O $@ "https://github.com/status-im/nim-libp2p/archive/${commitSha}.zip"
|
||||||
|
|
||||||
|
.PHONY: clean all
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm image.json
|
rm -f main.nim
|
||||||
|
rm -f image.json
|
||||||
|
rm -rf nim-libp2p*
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
# Package
|
|
||||||
|
|
||||||
version = "0.1.0"
|
|
||||||
author = "The author"
|
|
||||||
description = "Demo for another package"
|
|
||||||
license = "MIT"
|
|
||||||
|
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
|
|
||||||
requires "nim >= 1.2.2",
|
|
||||||
"libp2p == 1.0.0",
|
|
||||||
"redis == 0.4.0"
|
|
Loading…
x
Reference in New Issue
Block a user