Skip to content
Snippets Groups Projects
Commit 2f87b413 authored by Gilles Filippini's avatar Gilles Filippini
Browse files

build (docker): build for Debian buster

Because the CI jobs use the paritytech/ci-linux image (debian based),
maintained by the substrate developers, and which contains everything it
does to do CI stuff on a substrate project.

Remove RUSTFLAGS environment variable as it is needed for Alpine Linux
only.
parent d42aac05
No related branches found
No related tags found
1 merge request!7build: docker image and compose file
......@@ -2,50 +2,33 @@
# Build Stage
# ------------------------------------------------------------------------------
FROM alpine as build
RUN apk update && \
apk add ca-certificates curl && \
update-ca-certificates && \
apk add --update \
cmake \
make \
pkgconfig \
gcc \
g++ \
musl-dev \
linux-headers \
protoc \
openssl-dev \
clang-dev
# install latest stable rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
# Building for Debian buster because we need the binary to be compatible
# with the image paritytech/ci-linux:production (currently based on
# debian:buster-slim) used by the gitlab CI
FROM rust:1-buster as build
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
clang
# Copy source tree
COPY . .
# build duniter
ARG threads=1
RUN source ~/.cargo/env && \
CARGO_PROFILE_RELEASE_LTO="true" \
RUSTFLAGS="-C target-feature=-crt-static" \
cargo build --release -j $threads
RUN CARGO_PROFILE_RELEASE_LTO="true" \
cargo build --release -j $threads
# ------------------------------------------------------------------------------
# Final Stage
# ------------------------------------------------------------------------------
FROM alpine
FROM debian:buster-slim
LABEL maintainer="Gilles Filippini <gilles.filippini@pini.fr>"
LABEL version="0.0.0"
LABEL description="Crypto-currency software (based on Substrate framework) to operate Ğ1 libre currency"
# Dependancies
RUN apk update && \
apk add libstdc++
# Intall
COPY --from=build /target/release/duniter /usr/local/bin/duniter
COPY docker/docker-entrypoint /usr/local/bin/
......
#!/bin/sh
#!/bin/bash
function boolean () {
echo "$1" | sed -E 's/^(true|yes|1)$/true/i'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment