w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Dockerfile to download Java 8 on Amazon Beanstalk Linux

For me it looks like problem with connection.

  1. Are you sure that this code works without Docker inside target host?
  2. Does it work in your machine?
  3. Are you sure that echo command is doing what you really want ? I mean installing java 8.

Ok so I will post my ideas:

  • Set up proxies: HTTP_PROXY, http_proxy, HTTPS_PROXY, https_proxy, http-proxy, https-proxy - yes that many proxies because different packages use different names of proxy.
  • Add proxy to etc/apt/apt.conf to Acquire::http::Proxy "http://proxy-abc.com:888/";
  • Add proxy to docker:

Inside etc/default/docker:

export http_proxy=http://proxy-abc.com:888/
export https_proxy=https://proxy-abc.com:888/
DOCKER_OPTS="-H tcp://127.0.0.1:4243 -H unix://var/run/docker.sock -g
/docker"
  • Look at docker container logs: sudo cat log/var/lib/docker/containers/12eaca16d3cdc628304263b21d27614e5a0c44f09c2072470b09a1bb3def5559/12eaca16d3cdc628304263b21d27614e5a0c44f09c2072470b09a1bb3def5559-json.log
  • Does your target host has newest kernel ? In older kernels docker had problems with network communication
  • Does your target host had newest docker installed?

EDIT

Why wouldn't use prebuild images? FROM dockerfile/java:oracle-java8





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.