Epikcoder commited on
Commit ·
a26bc91
1
Parent(s): 7b7c4ce
varo gendeng
Browse files- Dockerfile +52 -1
- beta.js +1 -0
Dockerfile
CHANGED
|
@@ -6,6 +6,57 @@ WORKDIR /app
|
|
| 6 |
# Copy the application files to the container
|
| 7 |
ADD . /app
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
# Install necessary packages
|
| 10 |
RUN apk --update --upgrade add --no-cache \
|
| 11 |
font-noto \
|
|
@@ -25,7 +76,7 @@ RUN apk --update --upgrade add --no-cache \
|
|
| 25 |
librsvg-dev \
|
| 26 |
cairo \
|
| 27 |
pango \
|
| 28 |
-
chromium \
|
| 29 |
nss \
|
| 30 |
freetype \
|
| 31 |
harfbuzz \
|
|
|
|
| 6 |
# Copy the application files to the container
|
| 7 |
ADD . /app
|
| 8 |
|
| 9 |
+
|
| 10 |
+
ENV LANG en_US.UTF-8
|
| 11 |
+
ENV LANGUAGE en_US:en
|
| 12 |
+
ENV LC_ALL en_US.UTF-8
|
| 13 |
+
ENV GLIBC_REPO=https://github.com/sgerrand/alpine-pkg-glibc
|
| 14 |
+
ENV GLIBC_VERSION=2.34-r0
|
| 15 |
+
RUN set -ex && \
|
| 16 |
+
apk --update add libstdc++ curl ca-certificates && \
|
| 17 |
+
for pkg in glibc-${GLIBC_VERSION} glibc-bin-${GLIBC_VERSION}; \
|
| 18 |
+
do curl -sSL ${GLIBC_REPO}/releases/download/${GLIBC_VERSION}/${pkg}.apk -o /tmp/${pkg}.apk; done && \
|
| 19 |
+
apk add --allow-untrusted /tmp/*.apk && \
|
| 20 |
+
rm -v /tmp/*.apk && \
|
| 21 |
+
/usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib
|
| 22 |
+
|
| 23 |
+
# Install prerequisites and helper packages
|
| 24 |
+
RUN apk add --no-cache \
|
| 25 |
+
bash dpkg xeyes
|
| 26 |
+
|
| 27 |
+
# Download and unpack Chrome
|
| 28 |
+
RUN set -ex && \
|
| 29 |
+
curl -SL https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /google-chrome-stable_current_amd64.deb && \
|
| 30 |
+
dpkg -x /google-chrome-stable_current_amd64.deb google-chrome-stable && \
|
| 31 |
+
mv /google-chrome-stable/usr/bin/* /usr/bin && \
|
| 32 |
+
mv /google-chrome-stable/usr/share/* /usr/share && \
|
| 33 |
+
mv /google-chrome-stable/etc/* /etc && \
|
| 34 |
+
mv /google-chrome-stable/opt/* /opt && \
|
| 35 |
+
rm -r /google-chrome-stable
|
| 36 |
+
|
| 37 |
+
# Install Chrome dependencies
|
| 38 |
+
RUN apk add --no-cache --update \
|
| 39 |
+
alsa-lib \
|
| 40 |
+
atk \
|
| 41 |
+
at-spi2-atk \
|
| 42 |
+
expat \
|
| 43 |
+
glib \
|
| 44 |
+
gtk+3.0 \
|
| 45 |
+
libdrm \
|
| 46 |
+
libx11 \
|
| 47 |
+
libxcomposite \
|
| 48 |
+
libxcursor \
|
| 49 |
+
libxdamage \
|
| 50 |
+
libxext \
|
| 51 |
+
libxi \
|
| 52 |
+
libxrandr \
|
| 53 |
+
libxscrnsaver \
|
| 54 |
+
libxshmfence \
|
| 55 |
+
libxtst \
|
| 56 |
+
mesa-gbm \
|
| 57 |
+
nss \
|
| 58 |
+
pango
|
| 59 |
+
|
| 60 |
# Install necessary packages
|
| 61 |
RUN apk --update --upgrade add --no-cache \
|
| 62 |
font-noto \
|
|
|
|
| 76 |
librsvg-dev \
|
| 77 |
cairo \
|
| 78 |
pango \
|
| 79 |
+
# chromium \
|
| 80 |
nss \
|
| 81 |
freetype \
|
| 82 |
harfbuzz \
|
beta.js
CHANGED
|
@@ -73,6 +73,7 @@ app.all("/down", async (req, res) => {
|
|
| 73 |
// return res.json(e)
|
| 74 |
}
|
| 75 |
}
|
|
|
|
| 76 |
return res.json({error: e})
|
| 77 |
|
| 78 |
})
|
|
|
|
| 73 |
// return res.json(e)
|
| 74 |
}
|
| 75 |
}
|
| 76 |
+
|
| 77 |
return res.json({error: e})
|
| 78 |
|
| 79 |
})
|