AWS Codebuild: docker run options

0

I have a build project in AWS CodeBuild. This project uses a docker image stored in AWS ECR. I have to modify the options which are used to run the container - specifically, I want to add --init. I see there is a initProcessEnabled option which can be used for ECS, but I don't understand how to combine this with CodeBuild.

  • Can you tell us what problem you're trying to solve, exactly? Why do you want to add --init?

1 Antwort
0

If you are using tini, in the buildspec.yml file, within the build phase, you could run the docker run --init... command. The buildspec.yml file syntax can be seen here.

profile pictureAWS
beantwortet vor 2 Jahren
  • Thanks for your reply, but I am still confused. In my understanding the commands specified in the build phase are the ones which are executed within the container which is specified in the environment section. I would like to modify the docker run which is used as environment. Is it possible? If not, I think I should run again a docker with the init option

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen