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

464
Views
How to install tool in alpine docker

I want to install some tools from linux in dockerfile

FROM python:2.7


COPY . /app

WORKDIR /app

RUN pip install --no-cache-dir -r requirements.txt

RUN apt-get update

RUN apt-get install -y dnsutils

CMD ["python","test.py"]

I want to use python2.7-alpine in docker file.

I have used this code to install dnsutils but the result show failed

RUN apk update && \
    apk add --virtual build-deps gcc python-dev musl-dev && \
    apk add postgresql-dev

I want to install dnsutils tool and python2.7-alpine

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

you can change the Dockerfile as follows

FROM alpine:3.9

RUN apk add --no-cache python && \
    python -m ensurepip && \
    rm -r /usr/lib/python*/ensurepip && \
    pip install --upgrade pip setuptools && \
    rm -r /root/.cache

For more information on the image you can follow: https://hub.docker.com/r/frolvlad/alpine-python2/dockerfile

To install dnsutils install bind-tools. Use the below code

FROM alpine:3.9

MAINTAINER QuangVu

COPY . /app

WORKDIR /app


RUN apk add --no-cache python && \
    python -m ensurepip && \
    rm -r /usr/lib/python*/ensurepip && \
    pip install --upgrade pip setuptools && \
    rm -r /root/.cache

#RUN pip install --no-cache-dir -r requirements.txt

RUN apk add --update --no-cache bind-tools


CMD ["python","test.py"]
over 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!