tarantool / docker

Docker images for tarantool database
https://hub.docker.com/r/tarantool/tarantool
52 stars 25 forks source link

How to create docker image of custom Tarantool's branch? #205

Closed Buristan closed 3 years ago

Buristan commented 3 years ago

Hi!

When I tried to build a custom docker image (with custom Tarantool's branch) with the following command:

$ TAG=1.10.8-experimental-memprof OS=alpine DIST=3.9 PORT=5200 make -f .gitlab.mk TNT_VER="experimental/1.10.8-with-memprof" build

Tons of logs and some minutes later I occur the following error (in installation phase):

+ rm -r /usr/src/geos
+ rm -rf /usr/src/geos
+ rm -rf /geos.tar.bz2
+ : '---------- luarocks ----------'
+ : ldoc
+ tarantoolctl rocks install ldoc
Warning: Failed searching manifest: Failed fetching manifest for https://rocks.tarantool.org/ - Failed downloading https://rocks.tarantool.org/manifest - /root/.cache/luarocks/https___rocks.tarantool.org_/manifest
Warning: Failed searching manifest: Failed fetching manifest for https://luarocks.org/repositories/rocks - Failed downloading https://luarocks.org/repositories/rocks/manifest - /root/.cache/luarocks/https___luarocks.org_repositories_rocks/manifest
Warning: Failed searching manifest: Failed fetching manifest for https://rocks.tarantool.org/ - Failed downloading https://rocks.tarantool.org/manifest - /root/.cache/luarocks/https___rocks.tarantool.org_/manifest
Warning: Failed searching manifest: Failed fetching manifest for https://luarocks.org/repositories/rocks - Failed downloading https://luarocks.org/repositories/rocks/manifest - /root/.cache/luarocks/https___luarocks.org_repositories_rocks/manifest
Warning: Failed searching manifest: Failed fetching manifest for https://rocks.tarantool.org/ - Failed downloading https://rocks.tarantool.org/manifest - /root/.cache/luarocks/https___rocks.tarantool.org_/manifest
Warning: Failed searching manifest: Failed fetching manifest for https://luarocks.org/repositories/rocks - Failed downloading https://luarocks.org/repositories/rocks/manifest - /root/.cache/luarocks/https___luarocks.org_repositories_rocks/manifest

Error: No results matching query were found.

Looks like the reason is this redirect:

$ curl https://rocks.tarantool.org/manifest
curl https://rocks.tarantool.org/manifest 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to target URL: ...

When run curl -L I get manifest as expected:

$ curl -L https://rocks.tarantool.org/manifest
commands = {}
modules = {}
repository = {
    argon2 = {
...

I take a look here, but AFAIK tarantoolctl does not support --server-only flag.

Is there any other workaround except to comment all luarocks-related stuff if I don't need it?

Buristan commented 3 years ago

Thanks @avtikhon for the solution:

$ TAG=1.10.8-experimental-memprof OS=alpine DIST=3.9 PORT=5200 make -f .gitlab.mk TNT_VER="experimental/1.10.8-with-memprof" ROCKS_INSTALLER="luarocks" build 
...
Successfully built 2b505caa3d3c
Successfully tagged tarantool/tarantool:1.10.8-experimental-memprof
...

Just add ROCKS_INSTALLER="luarocks" to the command.