Skip to content

Commit

Permalink
[ci] #3654: Fix iroha2 glibc-based Dockerfiles to be deployed
Browse files Browse the repository at this point in the history
Signed-off-by: BAStos525 <jungle.vas@yandex.ru>
  • Loading branch information
BAStos525 authored and appetrosyan committed Jul 26, 2023
1 parent 8089ba2 commit d51c8ec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN cargo build --target x86_64-unknown-linux-musl --features vendored --profile


# final image
FROM alpine:3.16
FROM alpine:3.18

ARG STORAGE=/storage
ARG TARGET_DIR=/iroha/target/x86_64-unknown-linux-musl/deploy
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.build.glibc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH

RUN pacman -Syu rustup mold openssl libgit2 git docker docker-buildx docker-compose --noconfirm
RUN pacman -Syu rustup mold openssl libgit2 git docker docker-buildx docker-compose glibc lib32-glibc --noconfirm

RUN rustup toolchain install nightly-2023-06-25-x86_64-unknown-linux-gnu
RUN rustup default nightly-2023-06-25-x86_64-unknown-linux-gnu
Expand Down
9 changes: 8 additions & 1 deletion Dockerfile.glibc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ RUN mold --run cargo build --target x86_64-unknown-linux-gnu --profile deploy
# final image
FROM alpine:3.18

ENV GLIBC_REPO=https://github.com/sgerrand/alpine-pkg-glibc
ENV GLIBC_VERSION=2.35-r1
ARG STORAGE=/storage
ARG TARGET_DIR=/iroha/target/x86_64-unknown-linux-gnu/deploy
ENV BIN_PATH=/usr/local/bin/
Expand All @@ -33,7 +35,12 @@ ENV IROHA2_GENESIS_PATH=$CONFIG_DIR/genesis.json
ENV KURA_BLOCK_STORE_PATH=$STORAGE

RUN set -ex && \
apk --update add curl ca-certificates && \
apk --update add libstdc++ curl ca-certificates gcompat && \
for pkg in glibc-${GLIBC_VERSION} glibc-bin-${GLIBC_VERSION}; \
do curl -sSL ${GLIBC_REPO}/releases/download/${GLIBC_VERSION}/${pkg}.apk -o /tmp/${pkg}.apk; done && \
apk add --force-overwrite --allow-untrusted /tmp/*.apk && \
rm -v /tmp/*.apk && \
/usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib && \
adduser --disabled-password iroha --shell /bin/bash --home /app && \
mkdir -p $CONFIG_DIR && \
mkdir $STORAGE && \
Expand Down

0 comments on commit d51c8ec

Please sign in to comment.