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

Cannot build shippingservice : failed to parse platform in step 1/16 #883

Closed
Vyankatesh5 opened this issue May 9, 2023 · 10 comments
Closed
Labels
question Further information is requested

Comments

@Vyankatesh5
Copy link

Bug Report

Release : v1.4.0

Symptom

While building the image using "sudo docker-compose up "
getting error
"Building shippingservice
Sending build context to Docker daemon 52.66MB
Step 1/16 : FROM --platform=${BUILDPLATFORM} rust:1.69 as builder
failed to parse platform : "" is an invalid component of "": platform specifier component must match "^[A-Za-z0-9_-]+$": invalid argument
ERROR: Service 'shippingservice' failed to build : Build failed
"

Reproduce

git clone https://github.com/open-telemetry/opentelemetry-demo.git
sudo docker-compose up

@Vyankatesh5 Vyankatesh5 added the bug Something isn't working label May 9, 2023
@julianocosta89
Copy link
Member

julianocosta89 commented May 9, 2023

Hello @Vyankatesh5 👋🏽 ,

Which OS are you using?

Could you try to build it running one of the following commands (depending on your OS architecture):

docker compose build --build-arg BUILDPLATFORM=linux/amd64
docker compose build --build-arg BUILDPLATFORM=linux/arm64

@Vyankatesh5
Copy link
Author

Hi @julianocosta89
Still getting the same error
command
sudo docker-compose build --build-arg BUILDPLATFORM=linux/amd64
image

@julianocosta89
Copy link
Member

Not sure if that would solve, but could you try with the newer version of docker compose?
I see that you are still using the v1.
The v2+ doesn't use the dash between the words.

The command should be executed like this:

docker compose build --build-arg BUILDPLATFORM=linux/amd64

@Vyankatesh5
Copy link
Author

Using v2+ solved the issue I was facing with the shippingservice
But stuck on another one , while building

image

@julianocosta89
Copy link
Member

Great new!

Lets try to fix this other one.
Could you try building just the currencyservice?

docker compose build currencyservice --no-cache

@Vyankatesh5
Copy link
Author

Getting the error
image

On another note :- I am using build because I have edited configuration files https://github.com/open-telemetry/opentelemetry-demo/blob/main/src/otelcollector/otelcol-config-extras.yml , it possible to pull other image and just build otelcolllector instead of building everything?

@julianocosta89
Copy link
Member

you do not need to build everything when updating the otelcol-config-extras.yml.
Just running the demo should work

@Vyankatesh5
Copy link
Author

Just to make sure after updating the otelcol-config-extras.yml and running docker compose up --no-build changes will be reflected?

@julianocosta89
Copy link
Member

yes, because the config files are added as a volume in the otel-col container:
https://github.com/open-telemetry/opentelemetry-demo/blob/main/docker-compose.yml#L628-L630

@Vyankatesh5
Copy link
Author

Thanks for the help @julianocosta89 . We can close this ticket.

@julianocosta89 julianocosta89 added question Further information is requested and removed bug Something isn't working labels May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants