Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter v2S
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
f2e9aa16
Commit
f2e9aa16
authored
9 months ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
fix(
#195
): cross-compilation was broken
parent
437324c8
No related branches found
No related tags found
No related merge requests found
Pipeline
#37977
waiting for manual action
Stage: build
Stage: release
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker/Dockerfile
+13
-1
13 additions, 1 deletion
docker/Dockerfile
with
13 additions
and
1 deletion
docker/Dockerfile
+
13
−
1
View file @
f2e9aa16
# Workaround for https://github.com/containers/buildah/issues/4742
FROM
debian:bullseye-slim
as
target
# ------------------------------------------------------------------------------
# Build Stage
# ------------------------------------------------------------------------------
...
...
@@ -8,10 +11,15 @@ FROM --platform=$BUILDPLATFORM rust:1-bullseye as build
ARG
BUILDPLATFORM
ARG
TARGETPLATFORM
# Debug
RUN
echo
"BUILDPLATFORM =
$BUILDPLATFORM
"
RUN
echo
"TARGETPLATFORM =
$TARGETPLATFORM
"
# We need the target arch triplet in both Debian and rust flavor
RUN
echo
"DEBIAN_ARCH_TRIPLET='
$(
dpkg-architecture
-A
${
TARGETPLATFORM
#linux/
}
-qDEB_TARGET_MULTIARCH
)
'"
>>
/root/dynenv
RUN
.
/root/dynenv
&&
\
echo
"RUST_ARCH_TRIPLET='
$(
echo
"
$DEBIAN_ARCH_TRIPLET
"
|
sed
-E
's/-linux-/-unknown&/'
)
'"
>>
/root/dynenv
RUN
cat
/root/dynenv
WORKDIR
/root
...
...
@@ -65,7 +73,7 @@ RUN if [ "$cucumber" != 0 ] && [ "$TARGETPLATFORM" = "$BUILDPLATFORM" ]; then \
# Final Stage
# ------------------------------------------------------------------------------
FROM
debian:bullseye-slim
FROM
target
LABEL
maintainer="Gilles Filippini <gilles.filippini@pini.fr>"
LABEL
version="0.0.0"
...
...
@@ -88,5 +96,9 @@ USER duniter
# Intall
COPY
--from=build /root/build /usr/local/bin/
COPY
--from=build /root/dynenv /var/lib/duniter
COPY
docker/docker-entrypoint /usr/local/bin/
COPY
docker/docker-distance-entrypoint /usr/local/bin/
# Debug
RUN
cat
/var/lib/duniter/dynenv
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment