arm64 대응
This commit is contained in:
parent
2160fcea46
commit
5e50b8a25d
14
Dockerfile
14
Dockerfile
|
@ -18,8 +18,8 @@ RUN set -x && \
|
|||
libcap-dev \
|
||||
lld \
|
||||
musl-dev &&\
|
||||
cargo build --release && \
|
||||
ldd target/release/setcap-static
|
||||
cargo build --release
|
||||
# ldd target/release/setcap-static
|
||||
|
||||
# RUN --mount=type=bind,rw,source=.,target=/host \
|
||||
# cp -avf target/release/setcap-static /host/setcap-static
|
||||
|
@ -27,3 +27,13 @@ RUN set -x && \
|
|||
|
||||
FROM scratch
|
||||
COPY --from=build /app/target/release/setcap-static /setcap-static
|
||||
|
||||
# buildah push e5bcd588c41f harbor.repository.lb.home.dc.internal.amuz.es/infrastructure/setcap-static:0.0.2-amd64
|
||||
# podman push e051029260e7 harbor.repository.lb.home.dc.internal.amuz.es/infrastructure/setcap-static:0.0.2-arm64
|
||||
# podman manifest create \
|
||||
# harbor.repository.lb.home.dc.internal.amuz.es/infrastructure/setcap-static:0.0.2 \
|
||||
# harbor.repository.lb.home.dc.internal.amuz.es/infrastructure/setcap-static:0.0.2-amd64 \
|
||||
# harbor.repository.lb.home.dc.internal.amuz.es/infrastructure/setcap-static:0.0.2-arm64
|
||||
# podman push 88cf0c74f harbor.repository.lb.home.dc.internal.amuz.es/infrastructure/setcap-static:0.0.2
|
||||
# podman push 88cf0c74f harbor.repository.lb.home.dc.internal.amuz.es/infrastructure/setcap-static:0.0-latest
|
||||
# podman push 88cf0c74f harbor.repository.lb.home.dc.internal.amuz.es/infrastructure/setcap-static:latest
|
|
@ -118,7 +118,7 @@ impl<'a> Iterator for IntoIter<'a> {
|
|||
///
|
||||
///It is UB to pass non-C string as it requires \0
|
||||
unsafe fn c_str_to_rust(ptr: *const u8) -> Result<&'static str, core::str::Utf8Error> {
|
||||
let len = libc::strlen(ptr as *const i8);
|
||||
let len = libc::strlen(ptr as *const c_char);
|
||||
let parts = core::slice::from_raw_parts(ptr, len);
|
||||
core::str::from_utf8(parts)
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ unsafe fn c_str_to_rust(ptr: *const u8) -> Result<&'static str, core::str::Utf8E
|
|||
///
|
||||
///It is UB to pass non-C string as it requires \0
|
||||
unsafe fn c_str_to_rust_unchecked(ptr: *const u8) -> &'static str {
|
||||
let len = libc::strlen(ptr as *const i8);
|
||||
let len = libc::strlen(ptr as *const c_char);
|
||||
let parts = core::slice::from_raw_parts(ptr, len);
|
||||
core::str::from_utf8_unchecked(parts)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue