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
You are doing weird things. CM tool was never expected to be published in a container. This is just like a setup.exe for quick Selenoid installation. How to build a Docker images is described in this documentation section: https://aerokube.com/selenoid/latest/#_contributing_development Simply copy browsers.json as /etc/selenoid/browsers.json after doing steps from the docs and provide this path to /usr/bin/selenoid command using -conf flag. Original Dockerfile is published here: https://github.com/aerokube/selenoid/blob/master/Dockerfile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With