grupoboticario / nestjs-sap-rfc

NestJS SAP RFC Client, providing convenient ABAP business logic consumption from Nest.
MIT License
12 stars 2 forks source link

Issue while installing with dockerfile #691

Closed prajyot1708 closed 1 year ago

prajyot1708 commented 1 year ago

Hi Team,

Can you please help us with the dockerfile which can be used to build the docker image.

alvarolimajr commented 1 year ago

Hi @prajyot1708,

Here is an example dockerfile you can use, but you need to download the SAP SDK from their website (SAP ONE Support Launchpad). The last version: SAP NW RFC SDK 7.50 PL11

Download/information page:

FROM ubuntu:22.04

RUN apt update && apt install -y curl \
    unzip

RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -

RUN apt install -y nodejs

RUN mkdir -p /usr/local/sap

# Here you need to copy your SAP SDK (zip file)
COPY nwrfc750P_11-70002752.zip /tmp

# The content file to nwrfcsdk.conf
#### START CONTENT ### 
# # include nwrfcsdk
# /usr/local/sap/nwrfcsdk/lib
##### END CONTENT ###
COPY nwrfcsdk.conf /etc/ld.so.conf.d/

RUN unzip -o /tmp/nwrfc750P_11-70002752.zip -d /usr/local/sap

ENV SAPNWRFC_HOME /usr/local/sap/nwrfcsdk

RUN ldconfig

More information: https://github.com/SAP/node-rfc/blob/main/doc/installation.md#linux

I hope it helps you.

Best regards, Alvaro Junior

alvarolimajr commented 1 year ago

This example is just for configuring the SAP SDK, you will still need to build your application and run it.

prajyot1708 commented 1 year ago

Thanks @alvarolimajr. Its working.

prajyot1708 commented 1 year ago

@alvarolimajr I am facing this issue while npm install:

[16/17] RUN npm install:
42.12 npm notice
42.12 npm notice New minor version of npm available! 9.6.1 -> 9.8.0
42.12 npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.8.0
42.12 npm notice Run npm install -g npm@9.8.0 to update!
42.12 npm notice 42.12 npm ERR! code 1 42.12 npm ERR! path /app/node_modules/node-rfc 42.12 npm ERR! command failed 42.12 npm ERR! command sh -c prebuild-install -r napi || cmake-js rebuild 42.13 npm ERR! [ 42.13 npm ERR! '/usr/bin/node', 42.13 npm ERR! '/app/node_modules/node-rfc/node_modules/.bin/cmake-js', 42.13 npm ERR! 'rebuild' 42.13 npm ERR! ] 42.13 npm ERR! prebuild-install warn install No prebuilt binaries found (target=5 runtime=napi arch=arm64 libc= platform=linux) 42.13 npm ERR! ERR! OMG C++ Compiler toolset is not available. Install proper compiler toolset with your package manager, eg. 'sudo apt-get install g++'. 42.13 npm ERR! ERR! OMG C++ Compiler toolset is not available. Install proper compiler toolset with your package manager, eg. 'sudo apt-get install g++'. 42.13 42.13 npm ERR! A complete log of this run can be found in: