Skip to content

Commit

Permalink
Add xx to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteinLTU committed Dec 1, 2023
1 parent 460541f commit 4f726f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile-server
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM --platform=${BUILDPLATFORM:-linux/amd64} tonistiigi/xx AS xx
FROM --platform=${BUILDPLATFORM:-linux/amd64} rust AS builder

COPY --from=xx / /

ARG TARGETPLATFORM
ARG BUILDPLATFORM

Expand All @@ -9,7 +12,7 @@ WORKDIR /roboscape_build

COPY . .
WORKDIR /roboscape_build/roboscapesim-server
RUN cargo b -r
RUN xx-cargo b -r

FROM debian:bookworm-slim

Expand Down
1 change: 1 addition & 0 deletions roboscapesim-server/src/util/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub(crate) fn bool_val(val: &Value) -> bool {
}
}

/// Get string value from JSON value, with implicit conversion from other types
pub(crate) fn str_val(val: &Value) -> String {
match val {
Value::Bool(b) => if *b { "true".to_string() } else { false.to_string() },
Expand Down

0 comments on commit 4f726f6

Please sign in to comment.