Skip to content

Commit

Permalink
chore: Update Dockerfile to install cross and set up build environment
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorfdl committed Jun 19, 2024
1 parent cd27d80 commit 81ed055
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ RUN /bin/bash -c 'if [ -z "$CARGO_SERVER_SSL_CA" ]; then echo "Error: CARGO_SERV

# Install dependencies
RUN apt update
RUN apt install -y protobuf-compiler libssl-dev gcc pkg-config build-essential cmake clang
RUN apt install -y protobuf-compiler libssl-dev gcc pkg-config build-essential g++-aarch64-linux-gnu libc6-dev-arm64-cross

# Install cross
RUN cargo install cross
RUN rustup target add aarch64-unknown-linux-gnu

# Set up the build environment
RUN mkdir -p ${TAGOIO_SOURCE_FOLDER}
Expand All @@ -30,7 +30,7 @@ ADD . ${TAGOIO_SOURCE_FOLDER}
RUN touch .env

# Build the project
RUN cross build --release
RUN cargo build --release

# Unset the SSL environment variables
RUN unset CARGO_SERVER_SSL_CA CARGO_SERVER_SSL_CERT CARGO_SERVER_SSL_KEY
Expand Down
5 changes: 4 additions & 1 deletion dockerhub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ CARGO_SERVER_SSL_KEY_BASE64=$(echo "$CARGO_SERVER_SSL_KEY" | base64 -w 0)

# Alpine
# docker buildx build --push --build-arg TAGORELAY_VERSION=${FULL_VERSION} \
# --build-arg CARGO_SERVER_SSL_CA=${CARGO_SERVER_SSL_CA_BASE64} \
# --build-arg CARGO_SERVER_SSL_CERT=${CARGO_SERVER_SSL_CERT_BASE64} \
# --build-arg CARGO_SERVER_SSL_KEY=${CARGO_SERVER_SSL_KEY_BASE64} \
# --platform linux/arm64/v8,linux/amd64 \
# --tag tagoio/relay:alpine \
# --tag tagoio/relay:${MAJOR}.${MINOR}-alpine \
Expand All @@ -50,7 +53,7 @@ docker buildx build --push --build-arg TAGORELAY_VERSION=${FULL_VERSION} \
--build-arg CARGO_SERVER_SSL_CA=${CARGO_SERVER_SSL_CA_BASE64} \
--build-arg CARGO_SERVER_SSL_CERT=${CARGO_SERVER_SSL_CERT_BASE64} \
--build-arg CARGO_SERVER_SSL_KEY=${CARGO_SERVER_SSL_KEY_BASE64} \
--platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
--platform linux/arm/v7,linux/amd64 \
--tag tagoio/relay \
--tag tagoio/relay:debian \
--tag tagoio/relay:bullseye \
Expand Down

0 comments on commit 81ed055

Please sign in to comment.