SlvLabs / slavi-wallet

Mobile version of slavi wallet
50 stars 0 forks source link

Reproducability Build Fails Due to npm install Error #8

Open keraliss opened 2 months ago

keraliss commented 2 months ago

Hi, keraliss from walletscrutiny. i was trying to test your wallet, and got stuck.

this was the dockerfile i was using -

# Use Node.js 18-buster as the base image
FROM node:18-buster

# Set the working directory
WORKDIR /app

# Install required packages for building the environment
RUN apt-get update && apt-get install -y \
    openjdk-11-jdk \
    curl \
    unzip \
    git \
    build-essential \
    libssl-dev \
    libreadline-dev \
    zlib1g-dev \
    gnupg2 \
    wget \
    && rm -rf /var/lib/apt/lists/*

# Install Ruby from source
RUN wget https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.0.tar.gz \
    && tar -xzvf ruby-2.7.0.tar.gz \
    && cd ruby-2.7.0 \
    && ./configure \
    && make \
    && make install \
    && cd .. \
    && rm -rf ruby-2.7.0.tar.gz ruby-2.7.0

# Verify Ruby installation
RUN ruby -v

# Update RubyGems to a compatible version
RUN gem update --system 3.3.22

# Install the compatible version of ffi gem
RUN gem install ffi -v 1.17.0

# Set up Git configuration for private repository access
RUN git config --global url."https://keraliss:glpat-1jVtsgctKFqyDgQ9PyAy@gitlab.com/".insteadOf "https://gitlab.com/"

# Install CocoaPods
RUN gem install cocoapods

# Install Android SDK dependencies
RUN mkdir -p "/home/appuser/sdk/licenses" && \
    echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" > "/home/appuser/sdk/licenses/android-sdk-license"

# Download and unzip the Android command line tools
RUN wget https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip && \
    unzip commandlinetools-linux-9123335_latest.zip -d /home/appuser/sdk && \
    rm commandlinetools-linux-9123335_latest.zip

# Update and install required Android SDK packages
RUN yes | /home/appuser/sdk/cmdline-tools/bin/sdkmanager --sdk_root=/home/appuser/sdk \
    "platform-tools" "platforms;android-30" "build-tools;30.0.3"

# Set environment variables for Android SDK
ENV ANDROID_SDK_ROOT="/home/appuser/sdk"
ENV ANDROID_HOME="/home/appuser/sdk"

# Clone the Slavi Wallet repository
RUN git clone https://github.com/SlvLabs/slavi-wallet.git .

# Disable host key checking to prevent SSH issues
RUN mkdir -p /root/.ssh && ssh-keyscan gitlab.com >> /root/.ssh/known_hosts

# Install npm dependencies
RUN GIT_ASKPASS=echo npm install --force

# Build the project (adjust according to your build needs)
RUN npm run build

# Set the default command for the Docker container
CMD ["bash"]

and got this -

npm error code 128
npm error An unknown git error occurred
npm error command git --no-replace-objects ls-remote ssh://git@gitlab.com/defi-wallet/react-native-daterange-picker.git
npm error Warning: Permanently added the ECDSA host key for IP address '172.65.251.78' to the list of known hosts.
npm error git@gitlab.com: Permission denied (publickey).
npm error fatal: Could not read from remote repository.
npm error Please make sure you have the correct access rights and the repository exists.

This seems to be a permission error, but after trying these

Giszmo commented 2 months ago

Given https://gitlab.com/defi-wallet/react-native-daterange-picker is 404, too, I guess this project is either private or moved elsewhere.