Skip to content

Commit

Permalink
Build container with latest debian
Browse files Browse the repository at this point in the history
  • Loading branch information
olanod committed Sep 1, 2023
1 parent 75c6120 commit 8231f56
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ build-container:
COPY . /virto
RUN cargo build --release
FROM debian:bullseye-slim
FROM debian:bookworm-slim
VOLUME /data
COPY --from=builder /virto/{{ node }} /usr/bin
ENTRYPOINT ["/usr/bin/virto-node"]
Expand All @@ -59,23 +59,24 @@ build-container:
# Used to speed things up when the build environment is the same as the container(debian)
build-container-local: build-local
#!/usr/bin/env nu
'FROM debian:bullseye-slim
'FROM debian:bookworm-slim
LABEL io.containers.autoupdate="registry"
VOLUME /data
COPY {{ node }} /usr/bin
ENTRYPOINT ["/usr/bin/virto-node"]
CMD ["--dev"]'
| {{ podman }} build . -t {{ image }}:{{ ver }} -t {{ image }}:latest -f -

container_args := "--base-path /data '${NODE_ARGS}'" + if rol == "collator" {
" --collator --force-authoring -- --execution wasm --chain " + relay
container_args := "--base-path /data '$NODE_ARGS'" + if rol == "collator" {
" --collator --force-authoring -- --chain " + relay
} else { "" }
container_name := chain + "-" + rol

create-container:
@^mkdir -p release
podman rm -f {{ chain }}-{{ rol }}
podman create --name {{ chain }}-{{ rol }} {{ image }} {{ container_args }}
podman generate systemd --name --new --no-header {{ chain }}-{{ rol }} | str replace -s '$$' '$' | save -f release/container-{{ chain }}-{{ rol }}.service
podman rm -f {{ container_name }}
podman create --name {{ container_name }} --volume {{ container_name }}-data:/data {{ image }} {{ container_args }}
podman generate systemd --name --new --no-header --env 'NODE_ARGS=' {{ container_name }} | str replace -s '$$' '$' | save -f release/container-{{ chain }}-{{ rol }}.service

_chain_artifacts:
@^mkdir -p release
Expand Down

0 comments on commit 8231f56

Please sign in to comment.