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

[Bug]: Entrypoint for Docker image erases config file #1454

Closed
davidlago opened this issue Jan 12, 2022 · 2 comments · Fixed by #1458
Closed

[Bug]: Entrypoint for Docker image erases config file #1454

davidlago opened this issue Jan 12, 2022 · 2 comments · Fixed by #1458
Assignees
Labels
bug Something isn't working docker v1.2.4

Comments

@davidlago
Copy link

Describe the bug

After #1130 was merged, this line completely wipes out the configuration file of the docker container on startup.

To reproduce

docker run -it -p 9200:9200 -e "discovery.type=single-node" opensearchstaging/opensearch:1.2.4

as 1.2.4 is the first image built with this entrypoint.

Expected behavior

Container should start up successfully.

Screenshots

If applicable, add screenshots to help explain your problem.

Host / Environment

MacOS, docker.

Additional context

No response

Relevant log output

No response

@davidlago davidlago added bug Something isn't working untriaged Issues that have not yet been triaged labels Jan 12, 2022
@peterzhuamazon
Copy link
Member

Taking a look.

@peterzhuamazon peterzhuamazon self-assigned this Jan 12, 2022
@abhinavGupta16 abhinavGupta16 added v1.2.4 and removed untriaged Issues that have not yet been triaged labels Jan 12, 2022
@peterzhuamazon
Copy link
Member

The issue is due to that:

Reading from and writing to opensearch.yml in the same command line is error-prone. sed is trying to read from the file at the same time that tee wants to truncate it and write to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker v1.2.4
Projects
None yet
3 participants