I need to publish a Dockerfile that contains https://aerokube.com/selenoid.
This has to be a Dockerfile so I can publish it to our container registry which will be used as a service container as part of the pipeline/text execution https://learn.microsoft.com/en-us/azure/devops/pipelines/process/service-containers?view=azure-devops&tabs=yaml
Here is my dockerfile
FROM alpine:3.14
# Update Package
RUN apk update
# Install Selenoid Configuration Manager
RUN wget -O /usr/bin/cm https://github.com/aerokube/cm/releases/download/1.8.5/cm_linux_amd64 \
&& chmod +x /usr/bin/cm
# create dir
RUN mkdir -p /etc/selenoid
# Copy browsers.json
COPY browsers.json /etc/selenoid/browsers.json
EXPOSE 4444
CMD["/usr/bin/cm", "-conf", "/etc/selenoid/browsers.json"]
My browsers.json file is located in the same directory as the Dockerfile.
In my local testing I get the following error when trying to run the container
Error: unknown command "/etc/selenoid/browsers.json" for "cm"
Run 'cm --help' for usage.
I have also tried updating the command to be
CMD ["/usr/bin/cm", "selenoid","start", "-conf", "/etc/selenoid/browsers.json"]
But the error is even more insane
Failed to initialize: [can not access Docker: make sure you have Docker installed and current user has access permissions]
Changing CMD to ENTRYPOINT is the same result
Not sure if it's a typo but in your question you have a space missing in the original Dockerfile.
Should be: