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

fix: override entrypoint in the Docker Compose config #424

Merged
merged 1 commit into from
Apr 13, 2022
Merged

Conversation

afeld
Copy link
Contributor

@afeld afeld commented Apr 12, 2022

Unclear what changed to make the previous configuration stop working on my machine (something in Docker, perhaps?), causing this error:

$ docker compose up dev
[+] Running 2/2
 ⠿ Container benefits-server-1  Created                                                       0.0s
 ⠿ Container benefits-dev-1     Recreated                                                     0.2s
Attaching to benefits-dev-1
Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "-c": executable file not found in $PATH: unknown

This seems to be the recommended way to override the ENTRYPOINT and solved the problem.

@afeld afeld requested a review from a team as a code owner April 12, 2022 20:06
@thekaveman
Copy link
Member

Funny because we just (tried) to address something similar in #352. Taking a look at this.

Copy link
Member

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked for me, but I want to make sure @angela-tran and @machikoyasuda see it.

Particularly @machikoyasuda can you make sure this works on your machine.

@thekaveman thekaveman added this to the Dev environment cleanups milestone Apr 12, 2022
@thekaveman thekaveman added chore Chores and tasks for code cleanup, dev experience, etc. docker Application container, devcontainer, Compose, etc. labels Apr 12, 2022
Unclear what changed to make the previous configuration stop working on my machine (something in Docker, perhaps?), causing this error:

```
$ docker compose up dev
[+] Running 2/2
 ⠿ Container benefits-server-1  Created                                                       0.0s
 ⠿ Container benefits-dev-1     Recreated                                                     0.2s
Attaching to benefits-dev-1
Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "-c": executable file not found in $PATH: unknown
```

This seems to be [the recommended way to override the `ENTRYPOINT`](https://docs.docker.com/compose/compose-file/#entrypoint) and solved the problem.
@afeld afeld force-pushed the fix/docker-entry branch from a2ce89f to dc26d96 Compare April 12, 2022 21:39
@angela-tran
Copy link
Member

I was able to switch to this branch, rebuild the devcontainer, and have it open successfully.

@afeld afeld merged commit 2374045 into dev Apr 13, 2022
@afeld afeld deleted the fix/docker-entry branch April 13, 2022 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Chores and tasks for code cleanup, dev experience, etc. docker Application container, devcontainer, Compose, etc.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants