mirror of
https://github.com/caprover/caprover
synced 2025-10-30 18:07:25 +00:00
Updated dockerfiles
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
FROM node:14
|
||||
RUN apt-get update
|
||||
RUN apt-get update && apt-get full-upgrade -yqq && apt-get install build-essential cmake -yqq
|
||||
|
||||
RUN apt-get -y install netcat socat
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
FROM node:14-alpine
|
||||
|
||||
RUN apk update && apk upgrade && \
|
||||
apk add --no-cache bash git openssh openssl python python3 curl
|
||||
FROM node:14
|
||||
RUN apt-get update && apt-get full-upgrade -yqq && apt-get install build-essential cmake -yqq
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
||||
|
||||
# Build backend code
|
||||
|
||||
COPY . /usr/src/app
|
||||
@@ -29,7 +26,7 @@ RUN curl -Iv https://registry.yarnpkg.com/@ant-design/icons-svg/-/icons-svg-4.1.
|
||||
git clone https://github.com/githubsaturn/caprover-frontend.git && \
|
||||
cd caprover-frontend && \
|
||||
git log --max-count=1 && \
|
||||
yarn install --no-cache --frozen-lockfile --production --network-timeout 600000 && echo "Installation finished" && \
|
||||
yarn install --no-cache --frozen-lockfile --network-timeout 600000 && echo "Installation finished" && \
|
||||
yarn run build && echo "Building finished" && \
|
||||
mv ./build ../../app/dist-frontend && \
|
||||
cd / && \
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
FROM node:14
|
||||
RUN apt-get update && apt-get full-upgrade -yqq && apt-get install build-essential cmake -yqq
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
||||
# Build backend code.
|
||||
# Build backend code
|
||||
|
||||
COPY . /usr/src/app
|
||||
|
||||
RUN npm ci --production && \
|
||||
npm cache clean --force && \
|
||||
npm run build
|
||||
@@ -15,7 +18,7 @@ RUN npm ci --production && \
|
||||
|
||||
# Build frontend code using a fixed hash commit.
|
||||
|
||||
ENV FRONTEND_COMMIT_HASH d06103e63a96471f6da149ae37c83e984bf5f2a4
|
||||
ENV FRONTEND_COMMIT_HASH 8131e278e4febd6e435ccbbf678a229ba3329654
|
||||
|
||||
# armV7 fails: https://github.com/yarnpkg/yarn/issues/5259 https://github.com/nodejs/docker-node/issues/1335
|
||||
RUN curl -Iv https://registry.yarnpkg.com/@ant-design/icons-svg/-/icons-svg-4.1.0.tgz && \
|
||||
@@ -23,7 +26,7 @@ RUN curl -Iv https://registry.yarnpkg.com/@ant-design/icons-svg/-/icons-svg-4.1.
|
||||
git clone https://github.com/githubsaturn/caprover-frontend.git && \
|
||||
cd caprover-frontend && \
|
||||
git reset --hard ${FRONTEND_COMMIT_HASH} && \
|
||||
yarn install --no-cache --frozen-lockfile --production --network-timeout 600000 && echo "Installation finished" && \
|
||||
yarn install --no-cache --frozen-lockfile --network-timeout 600000 && echo "Installation finished" && \
|
||||
yarn run build && echo "Building finished" && \
|
||||
mv ./build ../../app/dist-frontend && \
|
||||
cd / && \
|
||||
|
||||
Reference in New Issue
Block a user