Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image not able to be run #5

Closed
Calebsakhtar opened this issue Oct 15, 2023 · 2 comments
Closed

Docker image not able to be run #5

Calebsakhtar opened this issue Oct 15, 2023 · 2 comments

Comments

@Calebsakhtar
Copy link
Contributor

Calebsakhtar commented Oct 15, 2023

Current Behavior:

Attempting to run a docker image of APCEMM results in the following error:

Error: (HTTP code 400) unexpected - failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/usr/sbin/sshd": stat /usr/sbin/sshd: no such file or directory: unknown

Expected Behavior:

Docker image should run without any error messages

Steps To Reproduce:

  1. Git checkout to commit ending in 1b07fbb
  2. On the command line (CMD) cd to APCEMM's root repository
  3. Run the following command in the terminal: docker build . -t apcemm -f .devcontainer/Dockerfile.apcemm
  4. Open docker desktop
  5. Navigate to the "Images" tab
  6. Find the "apcemm" image
  7. Under "Actions", click on the play symbol that displays "Run" when you hover over it

Environment Details

  • Docker version: 4.24.0
  • OS: Windows 10 Pro
  • OS Version: 22H2
  • OS Build: 19045.3570

Anything else:

It is my first time running an instance of Docker, so I might have missed something obvious.

@ddrake-mitre @sdeastham

@ddrake-mitre
Copy link
Contributor

Hi Caleb,

Sorry that you're having trouble. You are the first Windows user that I'm aware of, I tested on MacOS and Linux. It's possible this is one of those differences. Here are a couple things you can try:

  1. This Dockerfile is intended to be used inside VSCode as it's own development environment. There is a devcontainer tutorial that I often refer back to myself. I would suggest trying to run the Docker container using the method outlined in the tutorial, and see if you are able to make any more progress.

  2. If you're still getting the same error, try this in addition to the method above:

    # If it's just the last line in `Dockerfile.apcemm` that is causing issues, comment it out. 
    # CMD ["/usr/sbin/sshd", "-D", "-e", "-f", "/etc/ssh/sshd_config"] 

    That line was included because it enables some other IDEs to connect to the running container. It's not necessary to run in VSCode, but it didn't cause problems in Mac/Linux, otherwise I would have taken it out before now :)

Let me know if you're not able to resolve the issue.

@Calebsakhtar
Copy link
Contributor Author

Hi Dylan,

Thank you very much for spending your time replying to this.

Following the tutorial you suggested (option 1) worked and now the docker image runs within VS code. I will therefore close this issue.

Unfortunately I have encountered another problem during the APCEMM setup within the image. I have created a new issue regarding building APCEMM in this docker image using CMAKE, available here: APCEMM issue #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants