If your App's Image includes a
ENTRYPOINT declaration, a single implicit
cmd service will be created for it when you deploy your App.
Containers for the implicit
cmd Service will execute the
CMD your image defines (if you have an
ENTRYPOINT defined, then the
CMD will be passed as arguments to the
This corresponds to Docker's behavior when you use
docker run, so if you've started Containers for your image locally using
docker run my-image, you can expect Containers started on Aptible to behave identically.
CMD declaration is something you'd add in your Dockerfile, like so:
FROM alpine:3.5 ADD . /app CMD ["/app/run"]
Using an implicit service is recommended if your App only has one Service.
As you'd expect, no Implicit Service will be created for your App when you use Explicit Services.
If your App needs multiple Services, you can provide Aptible with a Procfile that indicates which services should be started when your App is deployed.
Broadly speaking, the Procfile contains a list of declarations, mapping service names to the commands the Containers for this service should run:
web: /app/run-web worker: /app/run-worker
When your App Containers start, they'll execute the command defined in your Procfile. Each service will run their associated command.
Updated 11 months ago