Closed edvenukko closed 1 week ago
Ah, finally, the title is correct now. š
Congrats, your important contribution to this open-source project has earned you a GitPOAP!
GitPOAP: 2024 Taiko Contributor:
Head to gitpoap.io & connect your GitHub account to mint!
Learn more about GitPOAPs here.
There are two problems in the current
Dockerfile
setup which can lead to issues when building and runningBuilding problem
Currently
ARG PACKAGE=eventindexer
is afterFROM golang:1.21.0 as builder
, when building withdocker build . -t taiko-mono
, onlybuilder
stage can correctly get thePACKAGE=eventindexer
, while stage withalpine
will get emptyPACKAGE
, causing the problem:This can be fixed by moving
ARG PACKAGE=eventindexer
to the first line of Dockerfile, and addARG PACKAGE
in each stage.Running problem
Currently Dockerfile is with
ENTRYPOINT ["$PACKAGE"]
, however in https://docs.docker.com/reference/dockerfile/#shell-and-exec-form we know this form(called "exec form")So using ENTRYPOINT like this will cause the following problem while running:
I've added
ENV PACKAGE=${PACKAGE}
and changed toENTRYPOINT /usr/local/bin/${PACKAGE}
, now the image can be run with commands likedocker run -it taiko-mono PACKAGE=eventindexer
.