Docker-OSX icon indicating copy to clipboard operation
Docker-OSX copied to clipboard

Running Xcode build

Open webdobe opened this issue 1 year ago • 1 comments

I have been unable to figure out how to gain access to xcode command line tools which doesn't allow my builds to finish:

FROM sickcodes/docker-osx:auto

USER root RUN pacman -Sy unzip --noconfirm

USER arch

Install Homebrew and dependencies

RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" RUN (echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/arch/.profile ENV PATH="${PATH}:/home/linuxbrew/.linuxbrew/bin" RUN brew install gcc RUN brew install nvm #RUN brew install [email protected] RUN brew install ruby-build && brew install rbenv

Configure nvm environment variables and source nvm

RUN echo 'export NVM_DIR="$HOME/.nvm"' >> /home/arch/.profile &&
echo '[ -s "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" ] && . "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh"' >> /home/arch/.profile &&
echo '[ -s "/home/linuxbrew/.linuxbrew/opt/nvm/etc/bash_completion.d/nvm" ] && . "/home/linuxbrew/.linuxbrew/opt/nvm/etc/bash_completion.d/nvm"' >> /home/arch/.profile &&
mkdir -p /home/arch/.nvm

Set the SHELL to use a login bash shell for subsequent RUN commands

SHELL ["/bin/bash", "-l", "-c"]

Using nvm commands in the RUN directive requires loading the nvm script

RUN nvm install 19

RUN echo "export NODE_PATH=$(nvm which 19)" >> /home/arch/.profile

RUN echo "export PATH=$NODE_PATH:$PATH" >> /home/arch/.profile

RUN echo $USER

Copy source and execute necessary commands

COPY --chown=arch:arch . /app WORKDIR /app RUN nvm use 19 RUN ls -al

RUN rbenv install 3.2.2 RUN rbenv global 3.2.2 RUN echo "eval '$(rbenv init - bash)'" >> /home/arch/.profile RUN ruby -v RUN gem install bundler RUN bundle install

WORKDIR /app/ios

this line fails because xcode does not exist.

RUN bundle exec pod install

WORKDIR /app RUN npm run ios -- --mode="Release"

webdobe avatar Oct 08 '23 17:10 webdobe

Hi have the same problem with xcodebuild, i cant use this command, any idea ? thanks

RambokDev avatar Apr 29 '24 15:04 RambokDev