Hello @whummer , thanks for your answer.
The built of the image worked:
FROM localstack/localstack:1.0.3
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y nodejs
# Show installed versions
RUN node --version
RUN npm --version
RUN .venv/bin/localstack --version
And localstack
is accessible from /opt/code/localstack/.venv/bin/localstack
in my Gitlab runner, BUT docker
is not available:
localstack.utils.container_utils.container_client.ContainerException: Docker not available
Detailed stacktrace:
$ LOCALSTACK="/opt/code/localstack/.venv/bin/localstack"
$ $LOCALSTACK start -d && sleep 10s && $LOCALSTACK status services
__ _______ __ __
/ / ____ _________ _/ / ___// /_____ ______/ /__
/ / / __ \/ ___/ __ `/ /\__ \/ __/ __ `/ ___/ //_/
/ /___/ /_/ / /__/ /_/ / /___/ / /_/ /_/ / /__/ ,<
/_____/\____/\___/\__,_/_//____/\__/\__,_/\___/_/|_|
💻 LocalStack CLI 1.0.3
[07:40:33] starting LocalStack in Docker mode 🐳 localstack.py:140
preparing environment bootstrap.py:667
Traceback (most recent call last):
File "/opt/code/localstack/.venv/bin/localstack", line 7, in <module>
exec(compile(f.read(), __file__, 'exec'))
File "/opt/code/localstack/bin/localstack", line 23, in <module>
main()
File "/opt/code/localstack/bin/localstack", line 19, in main
main.main()
File "/opt/code/localstack/localstack/cli/main.py", line 6, in main
cli()
File "/opt/code/localstack/localstack/cli/plugin.py", line 15, in __call__
self.group(*args, **kwargs)
File "/opt/code/localstack/.venv/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/opt/code/localstack/.venv/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/opt/code/localstack/.venv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/code/localstack/.venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/code/localstack/.venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/opt/code/localstack/localstack/utils/analytics/cli.py", line 66, in publisher_wrapper
return fn(*args, **kwargs)
File "/opt/code/localstack/localstack/cli/localstack.py", line 151, in cmd_start
bootstrap.start_infra_in_docker_detached(console)
File "/opt/code/localstack/localstack/utils/bootstrap.py", line 669, in start_infra_in_docker_detached
prepare_docker_start()
File "/opt/code/localstack/localstack/utils/bootstrap.py", line 519, in prepare_docker_start
if DOCKER_CLIENT.is_container_running(container_name):
File "/opt/code/localstack/localstack/utils/container_utils/container_client.py", line 469, in is_container_running
return container_name in self.get_running_container_names()
File "/opt/code/localstack/localstack/utils/container_utils/container_client.py", line 463, in get_running_container_names
result = self.list_containers(all=False)
File "/opt/code/localstack/localstack/utils/container_utils/docker_sdk_client.py", line 166, in list_containers
container_list = self.client().containers.list(filters=filter, all=all)
File "/opt/code/localstack/localstack/utils/container_utils/docker_sdk_client.py", line 51, in client
raise ContainerException("Docker not available")
localstack.utils.container_utils.container_client.ContainerException: Docker not available
I have checked the source code and I guess the Optional
is empty. Also, if I do docker info
on the Docker container (run by Gitlab runner) then I get: /scripts-19210-2786106/step_script: line 166: docker: command not found