alpine

java.net.InetAddress java class doesn't resolve IP on Alpine Docker container

ⅰ亾dé卋堺 提交于 2020-01-04 05:33:07
问题 When I run this code below inside container Docker running Java JDK 8 on Alpine Linux import java.io.*; import java.util.*; import java.net.*; public class SomaDBTest { public static void main(String... args) throws Throwable { InetAddress ip = InetAddress.getByName("mysql"); System.out.println("Begin - mysql IP Addr = " + ip.getHostAddress()); . . . } } I get the error: Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8 Exception in thread "main" java.net.UnknownHostException: mysql: unknown

docker repo resolving error during image build ERROR (check repositories file)

折月煮酒 提交于 2020-01-04 05:27:17
问题 I have a problem with building docker image and tried different DNS option but seems no luck. Docker version 1.9.1, build a34a1d5 Repos are alive. For running container I used docker run --dns=192.168.1.1 -d -ti --name alpine3 alpine tag and dns works weel there. For images I added my DNS IP 192.168.1.1 to /etc/docker/daemon.json and /etc/default/docker.io and to docker eth DNS but this didn't help. And I restarted docker service many times and re-pulled alpine image. I even created local

How can I get process name of specific PID with ps command in alpine

此生再无相见时 提交于 2020-01-02 04:27:07
问题 In ubuntu based docker/os $ ps PID USER TIME COMMAND 1 postgres 0:00 postgres 47 postgres 0:00 postgres: checkpointer process 48 postgres 0:00 postgres: writer process 49 postgres 0:00 postgres: wal writer process 50 postgres 0:00 postgres: autovacuum launcher process 51 postgres 0:00 postgres: stats collector process 52 postgres 0:00 postgres: bgworker: logical replication launcher Now If run ps -p 1 -o user= , it will get me PID 1 process USER postgres $ ps -p 1 -o user= postgres This is

Error when installing python3 packages in alpine

允我心安 提交于 2020-01-02 01:59:12
问题 I am currently building an image from alpine:3.7. There are two packages that I am having problems with: pendulum (specifically python-dateutils package) service_identity (specifically attrs package) The error that I receive it is: Could not find a version that satisfies the requirement setuptools (from versions: ) No matching distribution found for setuptools Note: all packages are pre-cached on a directory using pip download. The dockerfile looks as follows: RUN apk add --no-cache --virtual

On openjdk:7-jre-alpine docker how to install python 3.6

此生再无相见时 提交于 2020-01-01 10:28:16
问题 Up until about a week ago I was successfully using python 3.6 scripts on a java image like this: FROM openjdk:7-jre-alpine RUN apk update \ && apk upgrade \ && apk add --no-cache bash \ && apk add --no-cache --virtual=build-dependencies unzip \ && apk add --no-cache curl \ && apk add --no-cache go RUN apk add --no-cache python3 && \ python3 -m ensurepip && \ rm -r /usr/lib/python*/ensurepip && \ pip3 install --upgrade pip setuptools && \ if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip

How to deploy a Laravel Web Application on Alpine Linux using Docker?

偶尔善良 提交于 2020-01-01 09:44:09
问题 I am successfully deploying a Laravel Web Application on ECS using a base image from PHP, in particular 7.3-apache-stretch from https://hub.docker.com/_/php/ Being well aware of the discussion about Alpine Linux Images in Docker (granting significative reductions in the final image dimension), I wanted to give it a run, to see how it performed. Unfortunately, while with the CLI version it was very easy (using 7.3-cli-alpine3.9 ), there is no apache-enabled version. What I would need is a

GCC can't find stdio.h in Alpine Linux

强颜欢笑 提交于 2020-01-01 04:05:13
问题 In a fresh Alpine Linux I installed GCC by apk add --update-cache gcc but still a simple program #include <stdio.h> int main(int argc, char *argv[]) { return 0; } compiled with message fatal error: stdio.h: No such file or directory 回答1: Install libc-dev in addition to GCC, or just install build-base for everything (alpine-sdk is probably an overkill). To install run the following command: apk add libc-dev You need to install it separately because in Alpine Linux, the package GCC doesn't

Installing pandas in docker Alpine

巧了我就是萌 提交于 2019-12-31 12:01:51
问题 I am having a really hard time trying to install a stable data science package configuration in docker . This should be easier with such mainstream, relevant tools. The following is the Dockerfile that used to work, with a bit of a hack, removing pandas from the package core and installing it separately, specifying pandas<0.21.0 , because, allegedly, higher versions conflict with numpy . FROM alpine:3.6 ENV PACKAGES="\ dumb-init \ musl \ libc6-compat \ linux-headers \ build-base \ bash \ git

Oracle on Alpine linux

心不动则不痛 提交于 2019-12-30 19:53:31
问题 I am trying to install OCI8 extension on my Alpine Linux Docker environment. Although there are several places saying it won't work, there are some which say it actually does. I have a 3.4 version and for corporate reasons it is staying like that for now. I have done this within my Docker conf: # Install Oracle Client and build OCI8 (Oracel Command Interface 8 - PHP extension) USER root ENV LD_LIBRARY_PATH=/usr/local/instantclient ENV ORACLE_HOME=/usr/local/instantclient RUN apk update && apk

What is .build-deps for apk add --virtual command?

人盡茶涼 提交于 2019-12-29 11:31:02
问题 What is .build-deps in the following command? I can't find an explanation in the Alpine docs. Is this a file that is predefined? Is see this referenced in many Dockerfiles. RUN apk add --no-cache --virtual .build-deps \ gcc \ freetype-dev \ musl-dev RUN pip install --no-cache-dir <packages_that_require_gcc...> \ RUN apk del .build-deps 回答1: If you see the documentation -t, --virtual NAME Instead of adding all the packages to 'world', create a new virtual package with the listed dependencies