Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM centos:8 as build-stage

ENV NODE_OPTIONS=--openssl-legacy-provider
#ENV NODE_OPTIONS=--openssl-legacy-provider
ENV NODE_VERSION=17.x
ENV ZEROTIER_ONE_VERSION=1.8.4
ENV ZEROTIER_ONE_VERSION=1.8.9

ENV PATCH_ALLOW=0

Expand All @@ -13,7 +13,12 @@ RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* && \
RUN curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo && \
rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg && \
curl -fsSL https://rpm.nodesource.com/setup_${NODE_VERSION} | bash - && \
dnf install -y nodejs yarn python3 wget git bash jq postgresql-devel curl gcc-c++ glibc-headers tar make diffutils patch
dnf module enable -y nodejs:12 && \
dnf install -y nodejs yarn python3 wget git bash jq postgresql-devel curl gcc-c++ glibc-headers tar make diffutils patch openssl-devel

RUN curl -fsSL https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly -y
RUN export PATH="$HOME/.cargo/bin:$PATH"
RUN $HOME/.cargo/bin/rustup toolchain install nightly

WORKDIR /src

Expand All @@ -30,7 +35,7 @@ RUN LIBPQXX_VERSION=`curl --silent "https://api.github.com/repos/jtv/libpqxx/rel
mv /src/libpqxx-* /src/libpqxx && \
rm -rf /tmp/libpqxx.tar.gz && \
cd /src/libpqxx && \
/src/libpqxx/configure --disable-documentation --with-pic && \
/src/libpqxx/configure CXXFLAGS="-std=c++17" --disable-documentation --with-pic && \
make && \
make install

Expand Down Expand Up @@ -59,7 +64,7 @@ RUN ZERO_UI_VERSION=`curl --silent "https://api.github.com/repos/dec0dOS/zero-ui
rm -rf /tmp/zero-ui.tar.gz && \
cd /src/zero-ui && \
yarn install && \
yarn installDeps && \
# yarn installDeps && \
yarn build

FROM centos:8
Expand Down Expand Up @@ -107,6 +112,8 @@ RUN S6_OVERLAY_VERSION=`curl --silent "https://api.github.com/repos/just-contain
# Frontend @ zero-ui
COPY --from=build-stage /src/zero-ui/frontend/build /app/frontend/build/

RUN npm install n -g && n 14.17.0

# Backend @ zero-ui
WORKDIR /app/backend
COPY --from=build-stage /src/zero-ui/backend/package*.json /app/backend
Expand Down