Skip to content

Commit

Permalink
try fix docker var quoting
Browse files Browse the repository at this point in the history
  • Loading branch information
gpmayorga committed Sep 16, 2023
1 parent e23b574 commit 74889f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
context: .
file: ./docker/centrifuge-chain/Dockerfile
build-args: |
FEATURES=${{ matrix.target == 'test' && join(['fast', 'runtime'], '-') || '' }}
FEATURES=${{ matrix.target == 'test' && 'fast-runtime' || '' }}
# SCCACHE_GHA_ENABLED="true"
# RUSTC_WRAPPER=sccache
push: ${{ github.ref == '/refs/heads/main' && true || false }}
Expand Down
22 changes: 11 additions & 11 deletions docker/centrifuge-chain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM --platform=linux/amd64 docker.io/library/ubuntu:22.04 as builder
# Defaults
ENV RUST_BACKTRACE 1
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
# apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold" && \
apt-get install -y \
Expand All @@ -22,7 +22,7 @@ FROM --platform=linux/amd64 docker.io/library/ubuntu:22.04 as builder

ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
PATH=/usr/local/cargo/bin:$PATH
# install rustup, use minimum components
RUN curl -L "https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init" \
-o rustup-init; \
Expand All @@ -31,16 +31,16 @@ FROM --platform=linux/amd64 docker.io/library/ubuntu:22.04 as builder
rm rustup-init;

# BUILD
ARG FEATURES=""
ARG RUST_TOOLCHAIN="1.66"
ARG RUSTC_WRAPPER=''
ARG SCCACHE_GHA_ENABLED="false"
ARG SCCACHE_GHA_ENABLED="false"

RUN rustup default $RUST_TOOLCHAIN && \
rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN

COPY . centrifuge-chain
WORKDIR /centrifuge-chain
WORKDIR /centridsfuge-chain
ARG FEATURES=""
RUN FEATURES=$(echo ${FEATURES} | tr -d '"') \
cargo build "--release" --features=${FEATURES}

Expand All @@ -64,7 +64,7 @@ FROM --platform=linux/amd64 docker.io/library/ubuntu:22.04
mkdir -p /data /centrifuge/.local/share && \
chown -R centrifuge:centrifuge /data && \
ln -s /data /centrifuge/.local/share/centrifuge

COPY --from=builder /centrifuge-chain/target/release/centrifuge-chain /usr/local/bin
# checks
RUN ldd /usr/local/bin/centrifuge-chain && \
Expand All @@ -77,12 +77,12 @@ FROM --platform=linux/amd64 docker.io/library/ubuntu:22.04

# minimize the attack surface
# RUN rm -rf /usr/bin /usr/sbin /usr/lib/python*

RUN apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* ;
RUN mkdir -p /root/.local/share/centrifuge-chain && \
ln -s /root/.local/share/centrifuge-chain /data
ln -s /root/.local/share/centrifuge-chain /data


ENV RUST_BACKTRACE 1
USER centrifuge
EXPOSE 30333 9933 9944
Expand Down

0 comments on commit 74889f6

Please sign in to comment.