Skip to content

Commit

Permalink
Updated docker image version from 16 to 21
Browse files Browse the repository at this point in the history
Updated to latest version of RDB. With old version project is not started

Removed yarn.lock

Version dump

Version dump
  • Loading branch information
galek authored and Галько Николай Андреевич committed Mar 8, 2021
1 parent 0fc3d09 commit 20cad09
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 10,909 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 8.16.1
nodejs 9.9.0
80 changes: 40 additions & 40 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:latest

# Sneak the stf executable into $PATH.
ENV PATH /app/bin:$PATH
Expand All @@ -15,57 +15,57 @@ EXPOSE 3000
# installs development files for node-gyp so that npm install won't have to
# wait for them on the first native module installation.
RUN export DEBIAN_FRONTEND=noninteractive && \
useradd --system \
--create-home \
--shell /usr/sbin/nologin \
stf-build && \
useradd --system \
--create-home \
--shell /usr/sbin/nologin \
stf && \
sed -i'' 's@http://archive.ubuntu.com/ubuntu/@mirror://mirrors.ubuntu.com/mirrors.txt@' /etc/apt/sources.list && \
apt-get update && \
apt-get -y install wget python build-essential && \
cd /tmp && \
wget --progress=dot:mega \
https://nodejs.org/dist/v8.9.3/node-v8.9.3-linux-x64.tar.xz && \
tar -xJf node-v*.tar.xz --strip-components 1 -C /usr/local && \
rm node-v*.tar.xz && \
su stf-build -s /bin/bash -c '/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js install' && \
apt-get -y install libzmq3-dev libprotobuf-dev git graphicsmagick openjdk-8-jdk yasm && \
apt-get clean && \
rm -rf /var/cache/apt/* /var/lib/apt/lists/* && \
mkdir /tmp/bundletool && \
cd /tmp/bundletool && \
wget --progress=dot:mega \
https://github.com/google/bundletool/releases/download/1.2.0/bundletool-all-1.2.0.jar && \
mv bundletool-all-1.2.0.jar bundletool.jar
useradd --system \
--create-home \
--shell /usr/sbin/nologin \
stf-build && \
useradd --system \
--create-home \
--shell /usr/sbin/nologin \
stf && \
sed -i'' 's@http://archive.ubuntu.com/ubuntu/@mirror://mirrors.ubuntu.com/mirrors.txt@' /etc/apt/sources.list && \
apt-get update && \
apt-get -y install wget python build-essential cmake && \
cd /tmp && \
wget --progress=dot:mega \
https://nodejs.org/dist/v9.9.0/node-v9.9.0-linux-x64.tar.xz && \
tar -xJf node-v*.tar.xz --strip-components 1 -C /usr/local && \
rm node-v*.tar.xz && \
su stf-build -s /bin/bash -c '/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js install' && \
apt-get -y install libzmq3-dev libprotobuf-dev git graphicsmagick openjdk-8-jdk yasm && \
apt-get clean && \
rm -rf /var/cache/apt/* /var/lib/apt/lists/* && \
mkdir /tmp/bundletool && \
cd /tmp/bundletool && \
wget --progress=dot:mega \
https://github.com/google/bundletool/releases/download/1.2.0/bundletool-all-1.2.0.jar && \
mv bundletool-all-1.2.0.jar bundletool.jar

# Copy app source.
COPY . /tmp/build/

# Give permissions to our build user.
RUN mkdir -p /app && \
chown -R stf-build:stf-build /tmp/build /tmp/bundletool /app
chown -R stf-build:stf-build /tmp/build /tmp/bundletool /app

# Switch over to the build user.
USER stf-build

# Run the build.
RUN set -x && \
cd /tmp/build && \
export PATH=$PWD/node_modules/.bin:$PATH && \
npm install --loglevel http && \
npm pack && \
tar xzf devicefarmer-stf-*.tgz --strip-components 1 -C /app && \
bower cache clean && \
npm prune --production && \
mv node_modules /app && \
rm -rf ~/.node-gyp && \
mkdir /app/bundletool && \
mv /tmp/bundletool/* /app/bundletool && \
cd /app && \
find /tmp -mindepth 1 ! -regex '^/tmp/hsperfdata_root\(/.*\)?' -delete
cd /tmp/build && \
export PATH=$PWD/node_modules/.bin:$PATH && \
npm install --loglevel http && \
npm pack && \
tar xzf devicefarmer-stf-*.tgz --strip-components 1 -C /app && \
bower cache clean && \
npm prune --production && \
mv node_modules /app && \
rm -rf ~/.node-gyp && \
mkdir /app/bundletool && \
mv /tmp/bundletool/* /app/bundletool && \
cd /app && \
find /tmp -mindepth 1 ! -regex '^/tmp/hsperfdata_root\(/.*\)?' -delete

# Switch to the app user.
USER stf
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3"
services:
rethinkdb:
container_name: rethinkdb
image: rethinkdb:2.3
image: rethinkdb:latest
restart: unless-stopped
volumes:
- "rethinkdb-data:/data"
Expand Down

0 comments on commit 20cad09

Please sign in to comment.