Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

265
Vistas
cannot run jfrog executable from inside alpine linux container

I am using an alpine linux container and specifically python:3.4-alpine and openjdk:8-jdk-alpine. When I try to execute any script or executable that I have placed in the executable I get Not Found error.

For example. When in the python:3.4-alpine container I want to install jfrog I follow the command here (after I install curl via apk). This command downloads a shell script and pipes it to sh which downloads and creates a jfrog executable with the correct permissions. When I am trying to run this executable I am getting

bin/sh: ./jfrog: not found

update

I discovered that the root user is using bin/ash by default, which I have no idea what it is. So I invoked bin/sh jfrog manually and I get

/ # bin/sh jfrog jfrog: line 1: ELF: not found jfrog: line 1: syntax error: unterminated quoted string

Any idea what I am doing wrong? I suspect that it has to do with only root user existing in the container.

about 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

I'm not sure but the jfrog executable is dynamically linked, and with ldd jfrog you get :

ldd jfrog
    /lib64/ld-linux-x86-64.so.2 (0x55ffb4c8d000)
    libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x55ffb4c8d000)
    libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x55ffb4c8d000)

As you can see you have libc dependencies, and alpine come with musl. You can try to add apk add libc6-compat but I'm not sure it will work

about 4 years ago · Santiago Trujillo Denunciar

0

the problem is, that jfrog cli was compiled against glibc and alpine linux only provides uclibc. To make it run under alpine its not trivial, you have to install a sandbox that is bigger than then alpine env. https://wiki.alpinelinux.org/wiki/Running_glibc_programs

Another possibility is to compile the jfrog binary yourself in alpine. This Dockerfile worked for me.

FROM golang:alpine
WORKDIR /app/
RUN apk update && apk add git

# checkout the latest tag of jfrog cli
RUN mkdir -p /go/src/github.com/jfrogdev/jfrog-cli-go \
 && git clone https://github.com/JFrogDev/jfrog-cli-go /go/src/github.com/jfrogdev/jfrog-cli-go\
 && cd /go/src/github.com/jfrogdev/jfrog-cli-go \
 && git checkout $(git describe --tags `git rev-list --tags --max-count=1`)

RUN GOOS=linux go get github.com/jfrogdev/jfrog-cli-go/jfrog

FROM alpine
COPY --from=0 /go/bin/jfrog /usr/bin/

ENTRYPOINT ["jfrog"]
about 4 years ago · Santiago Trujillo Denunciar

0

The script you are running begins with:

#!/bin/bash

Bash is not included with alpine by default. You can install it with:

apk update && apk add bash

Note that alpine is fairly stripped down by design, so there may be other missing dependencies that you'll need to add to make this script work.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda