question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build Docker image behind proxy

See original GitHub issue

Due to network issues I need to build my own custom docker image so that I can set my proxy servers. When I attempt to build the image I fail wen running > puppeteer@0.10.2 install /decktape/node_modules/puppeteer with the following message:

ERROR: Failed to download Chromium r497674! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
npm info lifecycle puppeteer@0.10.2~install: Failed to exec install script
npm WARN decktape@2.3.0 No license field.

Any assistance would be most helpful

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Blackbmscommented, Sep 25, 2017
FROM node:8.4.0-slim

ENV NODE_ENV production
ENV TERM xterm-color
ENV HTTP_PROXY http://proxyvipecc.nb.ford.com:83/
ENV HTTPS_PROXY https://proxyvipecc.nb.ford.com:83/
ENV http_proxy http://proxyvipecc.nb.ford.com:83/
ENV https_proxy https://proxyvipecc.nb.ford.com:83/

RUN apt-get update && \
    apt-get install -yq --no-install-recommends \
    libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
    libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
    libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
    libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
    libnss3

WORKDIR /decktape

COPY package.json ./
COPY libs libs/
COPY plugins plugins/
COPY decktape.js ./

RUN chown -R node:node /decktape

# https://github.com/moby/moby/issues/20295
RUN mkdir /slides
RUN chown -R node:node /slides

USER node

RUN npm config set proxy http://proxyvipecc.nb.ford.com:83/
RUN npm config set https-proxy https://proxyvipecc.nb.ford.com:83/

RUN npm install

WORKDIR /slides

# The --no-sandbox option is required for the moment
# https://github.com/GoogleChrome/puppeteer/issues/290
ENTRYPOINT ["node", "/decktape/decktape.js", "--no-sandbox"]

CMD ["-h"]
0reactions
Blackbmscommented, Sep 25, 2017

I’m going to close this as you were able to answer my questions. Thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker Build Proxy: Setup the proxy for Dockerfile building
If we just need to pull or push the docker image, it is fine to set up the proxy by system service conf...
Read more >
How to build Docker Images with Dockerfile behind ...
Only this way seems to be working with Ubuntu 18.04 image for me. Thanks for sharing. I created a file ~/.docker/config.json with proxy...
Read more >
Configure Docker to use a proxy server - Docker Documentation
On the Docker client, create or edit the file ~/.docker/config.json in the home directory of the user that starts containers. Add JSON similar...
Read more >
Using Docker Behind a Proxy | Cloudbees Blog
In this article, we will be building a simple ubuntu -based container that uses apt-get to install curl . While this example is...
Read more >
Building Docker containers behind a proxy - Yaakov's Blog
Docker itself supports HTTP proxies. On Windows, the Docker for Windows settings interface has a little place to enter proxy settings, and then ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found