question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mitmproxy/mitmproxy:latest Docker image: env: can't execute 'bash': No such file or directory

See original GitHub issue

Problem Description

I was using mitmproxy/mitmproxy:latest Docker image as a base for my custom image. In my image entrypoint script uses tiny shell script to set up certificates from the environment variable. Today I noticed that my container doesn’t start and crashes with the following error:

env: can't execute 'bash': No such file or directory

My shell script:

#! /usr/bin/env sh

PEM=$SERVER_PEM

if [ -z "$PEM" ]; then
    echo "Server PEM is not set"
    exit 1
fi

echo "$PEM" > ./server.pem

echo "Server PEM is set"

With mitmproxy/mitmproxy:5.0.1 image everything is fine.

Steps to reproduce the behavior:

docker run -it --rm mitmproxy/mitmproxy:latest sh

System Information

mitmproxy/mitmproxy:latest Docker image Docker Desktop 2.2.0.5 on macOS Catalina 10.15.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dlbascommented, Apr 13, 2020

Confirming, both latest and dev tags work as expected.

0reactions
dlbascommented, Apr 13, 2020

Thanks, I will try a little later today!

On Mon, Apr 13, 2020, 13:24 Thomas Kriechbaumer notifications@github.com wrote:

@MagnificentUrukHai https://github.com/MagnificentUrukHai please try with the most recent dev tag of the Docker image - it should fix the problem. I plan to release a proper bugfix release later today.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mitmproxy/mitmproxy/issues/3933#issuecomment-612843798, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3FWMI7M4UAEMCURBBN7CLRMLR7NANCNFSM4MG2YYDA .

Read more comments on GitHub >

github_iconTop Results From Across the Web

mitmproxy - Docker Image
An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers.
Read more >
Docker gives `no such file or directory` on `docker run ...
After changing the Dockerfile I delete the image and any containers and rerun using the docker build -t command. After running the image...
Read more >
Build Inputs - Builds | OpenShift Container Platform 3.11
The input secrets are always mounted into the /var/run/secrets/openshift.io/build directory or your builder can parse the $BUILD environment variable, which ...
Read more >
Container registry · Packages · Administration · Help · GitLab
This document is the administrator's guide. To learn how to use the GitLab Container Registry, see the user documentation.
Read more >
Docker Breakout / Privilege Escalation - HackTricks
docker run -it --rm --pid=host --privileged ubuntu bash ... Get full privs in container without --privileged ... spawn a new container to exploit...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found