I m setting up puppeteer on a docker container. Tried to do it according to their troubleshooting page https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-on-alpine.
但是,在创建和使用新的用户(用户)之后,服务器由于用户没有许可,因此可能会暴露80号港口。 傲慢:聆听EACCES0.0:80。
www.un.org/Depts/DGACM/index_spanish.htm 无法找到关于允许我增加这一用户的明确文件,以便用户能够购买美元。
三方增加用户以起诉,而那又不了工作,但另一方面,即使这样做,我假定这是错误的,因为它带来安全风险。
在开始使用新用户之前对港口进行三边挖掘,这也失败了。
Dockerfile
FROM node
# Installs latest Chromium (72) package.
RUN apk update && apk upgrade &&
echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories &&
echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories &&
apk add --no-cache
chromium@edge
nss@edge
freetype@edge
harfbuzz@edge
ttf-freefont@edge
udev
RUN mkdir -p /app
WORKDIR /app
# Tell Puppeteer to skip installing Chrome. We ll be using the installed package.
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
# Add user so we don t need --no-sandbox.
RUN addgroup -S pptruser && adduser -S -g pptruser pptruser
&& mkdir -p /home/pptruser/Downloads
&& chown -R pptruser:pptruser /home/pptruser
&& chown -R pptruser:pptruser /app
ENV PORT 80
ENV HTTP_PORT $PORT
ENV HTTPS_PORT 443
EXPOSE $HTTP_PORT
EXPOSE $HTTPS_PORT
USER pptruser
CMD [ "页: 1" ]
页: 1
#!/bin/sh
PORT="${HTTP_PORT:-80}"
node "app/bin/server.js"
误差
Error: listen EACCES 0.0.0.0:80
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at Server._listen2 (net.js:1258:19)
at listen (net.js:1307:10)
at Server.listen (net.js:1403:5)
at appServer.app.then.then.then (/app/bin/server.js:69:12)
任何帮助