User Node 14.x for docker base (#5480)

* User Node 14.x for docker base

* Move docker scripts

* Adjust paths

* Clean apt cache

* semgrep recommendations

* No recommends

* Additional clean
This commit is contained in:
Jaco 2021-06-07 16:06:43 +03:00 committed by GitHub
parent 44d0613618
commit a0e84550fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View File

@ -43,7 +43,7 @@ jobs:
env:
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
run: |
./scripts/docker.sh
./docker/build.sh
# only run on "CI skip", i.e. when the actual version has been bumped to release/stable
electron:

View File

@ -1,18 +1,20 @@
FROM ubuntu:18.04 as builder
# Install any needed packages
RUN apt-get update && apt-get install -y curl git gnupg
RUN apt-get update && \
apt-get install --no-install-recommends -y curl git gnupg && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# install nodejs
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install -y nodejs
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install --no-install-recommends -y nodejs
WORKDIR /apps
COPY . .
RUN npm install yarn -g
RUN yarn && NODE_ENV=production yarn build:www
CMD ["ls", "-al", "build"]
# ===========================================================
FROM nginx:stable-alpine

View File

@ -19,7 +19,7 @@ VERSION=$(cat package.json \
| sed 's/ //g')
echo "*** Building $NAME"
docker build -t $NAME .
docker build -t $NAME -f docker/Dockerfile .
docker login -u $REPO -p $DOCKER_PASS