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

1.1K
Views
/bin/sh: 1: sudo: no encontrado al ejecutar dockerfile

Este es el contenido de mi Dockerfile.

 FROM ubuntu RUN sudo apt-get update RUN sudo apt-get install -y wget CMD wget -O- -q http://ifconfig.me/ip

Cuando ejecuto Dockerfile para crear una imagen acoplable, aparece el siguiente error:

/bin/sh: 1: sudo: no encontrado

¿Pueden ayudarme a resolver el error anterior?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

por defecto, el contenedor docker se ejecuta como usuario root
elimine el sudo de Dockerfile y ejecútelo de nuevo.

ingrese la descripción de la imagen aquí

over 4 years ago · Santiago Trujillo Report

0

Sus comandos en Dockerfile ya se ejecutan como root durante la docker build de Docker. Por esta razón, no necesita usar sudo

over 4 years ago · Santiago Trujillo Report

0

No necesitas sudo en este caso. Cambie Dockerfile como se muestra a continuación:

 FROM ubuntu RUN apt-get update -y && \ apt-get install -y wget CMD wget -O- -q http://ifconfig.me/ip

PD: combine las declaraciones RUN tanto como sea posible.

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!