Updated dockerfiles

This commit is contained in:
Kasra Bigdeli
2021-08-27 19:38:32 -07:00
parent 5d64e5971f
commit c85757eeb4
3 changed files with 11 additions and 10 deletions

View File

@@ -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

View File

@@ -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 / && \

View File

@@ -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 / && \