1

I am following this guide to make a aws lambda package for a piece of python code. The only difference is that I am pulling a python3.7 image like so:

docker run  lambci/lambda:build-python3.7 aws --version

According to the documentation I should be able to run uname and to check that I am inside the linux environment. I am not inside this environment.

I am unable to enter the docker image after it has completed the pull, how do I enter the docker container after it has completed being pulled?

RustyShackleford
  • 3,462
  • 9
  • 40
  • 81

1 Answers1

2

You need to specify a command (looks like that image does not have default one). Also add -it as parameters, then it works:

docker run -it lambci/lambda:build-python3.7 bash

https://serverfault.com/questions/757210/no-command-specified-from-re-imported-docker-image-container

$: man docker
-i, --interactive                    Keep STDIN open even if not attached
-t, --tty                            Allocate a pseudo-TTY

I did not get why -i is needed as it is not run in detached mode, but does not work w/out it. Welcome explanations from experts in comments.

Marisha
  • 816
  • 9
  • 14