alpine package py-pip missing
Do update first: apk add –update py-pip Or: apk update apk add py-pip
Do update first: apk add –update py-pip Or: apk update apk add py-pip
Yes there is, I’ve used a custom built glibc to install a JRE on it. You can find it here You can use wget or curl to get the code and apk to install them UPDATED commands see comments below apk –no-cache add ca-certificates wget wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk apk add glibc-2.28-r0.apk … Read more
Alpine comes with ash as the default shell instead of bash. So you can Have a shebang defining /bin/bash as the first line of your sayhello.sh, so your file sayhello.sh will begin with bin/sh #!/bin/sh Install Bash in your Alpine image, as you seem to expect Bash is present, with such a line in your … Read more
For those seeing this error using a Dockerfile (and coming here via a Google search): add the following line to your Dockerfile: USER root
UPD from 07.2019: https://stackoverflow.com/a/57145029/907576 Taking as an example of simple spring boot application (with only one REST endpoint) so far i was able to figure out the following solutions (considering application jar is located at build/libs/spring-boot-demo.jar before Docker build: Jedi path if we want to use official Oracle OpenJDK distribution on stable slim Linux version … Read more
Run apk update first. The below paste contains a complete example: ole@T:~$ docker run -it –rm alpine /bin/ash / # apk update fetch http://dl-4.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz fetch http://dl-4.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz v3.3.1-97-g109077d [http://dl-4.alpinelinux.org/alpine/v3.3/main] v3.3.1-59-g48b0368 [http://dl-4.alpinelinux.org/alpine/v3.3/community] OK: 5853 distinct packages available / # apk add openssh (1/3) Installing openssh-client (7.1_p2-r0) (2/3) Installing openssh-sftp-server (7.1_p2-r0) (3/3) Installing openssh (7.1_p2-r0) Executing busybox-1.24.1-r7.trigger OK: … Read more
You can use the nsenter command to run a command on your host inside the network namespace of the Docker container. Just get the PID of your Docker container: docker inspect -f ‘{{.State.Pid}}’ container_name_or_id For example, on my system: $ docker inspect -f ‘{{.State.Pid}}’ c70b53d98466 15652 And once you have the PID, use that as … Read more
By default, if using the net package a build will likely produce a binary with some dynamic linking, e.g. to libc. You can inspect dynamically vs. statically link by viewing the result of ldd output.bin There are two solutions I’ve come across: Disable CGO, via CGO_ENABLED=0 Force the use of the Go implementation of net … Read more
The equivalent of apt or apt-get in Alpine is apk A typical Dockerfile will contain, for example: RUN apk add –no-cache wget –no-cache is the equivalent to: apk add wget && rm -rf /var/cache/apk/* or, before the –no-cache option was available: RUN apk update && apk add wget Alpine rm -rf /var/cache/apk/* has the Debian … Read more