Skip to content

Commit

Permalink
Updated dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
githubsaturn committed Aug 28, 2021
1 parent 5d64e59 commit c85757e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion dockerfile-captain.debug
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 3 additions & 6 deletions dockerfile-captain.edge
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 / && \
Expand Down
9 changes: 6 additions & 3 deletions dockerfile-captain.release
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -15,15 +18,15 @@ 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 && \
mkdir -p /usr/src/app-frontend && cd /usr/src/app-frontend && \
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 / && \
Expand Down

0 comments on commit c85757e

Please sign in to comment.