Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

266
Views
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 answers
Answer question

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 Report

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!