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

467
Vistas
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 Respuestas
Responde la pregunta

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 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