Questions tagged [alpine-linux]

Alpine Linux is a small, simple and secure Linux distribution based on musl libc and busybox. For questions related to the Alpine.js framework, use the tag [alpine.js].

The Alpine Linux distribution is born from a fork of another Linux project called LEAF (Linux Embedded Appliance Framework Project) that was itself forked from a project aimed at keeping a Linux distribution fitting on a floppy disk.

With its light-weighted approach, Alpine is very popular for embedded systems and containers alike, as it also offers quick boot-up time. A container running Alpine would take no more than 8 MB; while an installation on a disk would require around 130 MB.

This small size is also achieved with simplicity in mind. Alpine uses its own package manager, called apk and is coming with a really limited set of tools:

  • musl, for a minimal libc
  • openrc, as the init system
  • the coreutils of busybox

Alpine is making use of techniques like Position Independent Executables (PIE) and stack smashing protection, which protects the OS from some common vulnerabilities.

Resources

Related tags

1772 questions
101
votes
3 answers

Installing OpenSSH on the Alpine Docker Container

When running the alpine docker container the first time and attempting an openssh install, the following happens: ole@T:~$ docker run -it --rm alpine /bin/ash / # apk add openssh WARNING: Ignoring APKINDEX.d3812b7e.tar.gz: No such file or…
Ole
  • 41,793
  • 59
  • 191
  • 359
95
votes
8 answers

Alpine Docker ERROR: Unable to lock database: Permission denied ERROR: Failed to open apk database: Permission denied

So I have used the default docker for testcafe which on docker hub is testcafe/testcafe and I have to run a few testcafe scripts. However, I need the screenshot that fires on error, to be uploaded to somewhere where I can look at it later after…
Vladimir_314159
  • 1,457
  • 1
  • 9
  • 21
94
votes
13 answers

How to install aws-cli on alpine?

I'm installing aws-cli on a docker swarm manager node running alpine (Linux 0317632a4ad9 4.9.59-moby #1 SMP Thu Mar 1 20:54:00 UTC 2018 x86_64 Linux). The aws-cli package for Alpine is currently listed in the community repo on the edge branch…
HieroB
  • 3,917
  • 4
  • 17
  • 22
90
votes
5 answers

Java 11 application as lightweight docker image

Inspired by question Why is the Java 11 base Docker image so large? (openjdk:11-jre-slim) I found that this topic in Java world is still not settled. As for 07 Dec 2018 there are common issues/pitfalls (discussed in the ticket above): JRE is not…
radistao
  • 14,889
  • 11
  • 66
  • 92
81
votes
3 answers

Alpine Add Package from Edge repository

If I'm using Alpine 3.8, how can I add a specific package from the Alpine Edge repository? Is this even supported? There is no equivalent of backports, from what I can see. I want to add the new version of this:…
clay
  • 18,138
  • 28
  • 107
  • 192
77
votes
4 answers

How do I run a Bash script in an Alpine Docker container?

I have a directory containing only two files, Dockerfile and sayhello.sh: . ├── Dockerfile └── sayhello.sh The Dockerfile reads FROM alpine COPY sayhello.sh sayhello.sh CMD ["sayhello.sh"] and sayhello.sh contains simply echo hello The Dockerfile…
Kurt Peek
  • 52,165
  • 91
  • 301
  • 526
77
votes
6 answers

Is there a best practice on setting up glibc on docker alpine linux base image?

Is there a best practice on setting up glibc on docker alpine linux base image with correct paths so any spawned process can correctly reference the location of the installed libc libraries?
kai
  • 817
  • 1
  • 6
  • 8
74
votes
1 answer

GCC can't find stdio.h in Alpine Linux

In a fresh Alpine Linux I installed GCC by apk add --update-cache gcc but still a simple program #include int main(int argc, char *argv[]) { return 0; } compiled with message fatal error: stdio.h: No such file or directory
Franklin Yu
  • 8,920
  • 6
  • 43
  • 57
73
votes
10 answers

alpine package py-pip missing

Im trying to install python pip in my alpine using Docker compose file but get the following error. ERROR: unsatisfiable constraints: py-pip (missing): required by: world[py-pip] ERROR: Service 'web' failed to build: The command '/bin/sh -c…
user1050619
  • 19,822
  • 85
  • 237
  • 413
69
votes
6 answers

Docker Node Alpine Image Build Fails on node-gyp

I'm attempting to Dockerize a Vue.js application. I'm using the node:10.15-alpine Docker image as a base. The image build fails with the following error: gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can…
Jason
  • 2,382
  • 1
  • 16
  • 29
68
votes
7 answers

Installed Go binary not found in path on Alpine Linux Docker

I've got a Go binary I'm trying to run on the Alpine Docker image. This works fine for the Docker Go binary. docker run -it alpine:3.3 sh apk add --no-cache curl DOCKER_BUCKET=get.docker.com DOCKER_VERSION=1.9.1 curl -fSL…
Everett Toews
  • 10,337
  • 10
  • 44
  • 45
63
votes
6 answers

Docker Alpine executable binary not found even if in PATH

I have an alpine running container which contains some binaries in usr/local/bin When I ls the content of usr/local/bin I got this output : /usr/local/bin # ls dwg2SVG dwg2dxf dwgadd dwgbmp dwgfilter dwggrep dwglayers …
jossefaz
  • 3,312
  • 4
  • 17
  • 40
60
votes
5 answers

Docker Alpine Linux python (missing)

I have a pipeline which deploys my container from GitLab. Last deployment was 5 days ago and went without any problems. Today I deploy it and get the following error: $ apk add --no-cache curl python py-pip fetch…
AGoranov
  • 2,114
  • 3
  • 15
  • 27
59
votes
4 answers

How to get /etc/profile to run automatically in Alpine / Docker

How can I get /etc/profile to run automatically when starting an Alpine Docker container interactively? I have added some aliases to an aliases.sh file and placed it in /etc/profile.d, but when I start the container using docker run -it…
Jeff Kilbride
  • 2,614
  • 1
  • 20
  • 21
58
votes
1 answer

How to add trusted root CA to Docker alpine

Suppose I am at network where there is MITM SSL swaping firewall (google.com is not issued by Google, but reissued by custom CA root authority) some more details here…
bedla.czech
  • 879
  • 1
  • 8
  • 13