代码拉取完成,页面将自动刷新
FROM node:16-bookworm
RUN apt-get update && apt-get install -y dos2unix
# Change working directory
WORKDIR /usr/src/app
# Clone FUXA repository
RUN git clone https://github.com/frangoteam/FUXA.git
# Install build dependencies for node-odbc
RUN apt-get update && apt-get install -y build-essential unixodbc unixodbc-dev
# Convert the script to Unix format and make it executable
RUN dos2unix FUXA/odbc/install_odbc_drivers.sh && chmod +x FUXA/odbc/install_odbc_drivers.sh
WORKDIR /usr/src/app/FUXA/odbc
RUN ./install_odbc_drivers.sh
# Change working directory
WORKDIR /usr/src/app
# Copy odbcinst.ini to /etc
RUN cp FUXA/odbc/odbcinst.ini /etc/odbcinst.ini
# Clone node-odbc repository
RUN git clone https://github.com/markdirish/node-odbc.git
# Change working directory to node-odbc
WORKDIR /usr/src/app/node-odbc
# Install compatible versions of global npm packages
RUN npm install -g node-gyp && \
npm install -g npm@8 && \
npm install -g node-addon-api && \
npm install -g @mapbox/node-pre-gyp
# Install dependencies and build node-odbc
RUN npm ci --production && \
./node_modules/.bin/node-pre-gyp rebuild --production && \
./node_modules/.bin/node-pre-gyp package
# Build and install node-odbc
#RUN npm install
# Install Fuxa server
WORKDIR /usr/src/app/FUXA/server
RUN npm install
# Workaround for sqlite3 https://stackoverflow.com/questions/71894884/sqlite3-err-dlopen-failed-version-glibc-2-29-not-found
RUN apt-get update && apt-get install -y sqlite3 libsqlite3-dev && \
apt-get autoremove -yqq --purge && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
npm install --build-from-source --sqlite=/usr/bin sqlite3
# Add project files
ADD . /usr/src/app/FUXA
# Set working directory
WORKDIR /usr/src/app/FUXA/server
# Expose port
EXPOSE 1881
# Start the server
CMD [ "npm", "start" ]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。