Skip to content

Commit

Permalink
Don't reuse entrypoint which might be prefixed
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Feb 7, 2024
1 parent f5e4311 commit 3daefe9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/dockerfile/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,18 @@ COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs/
COPY --from=builder /etc/ssl/cert.pem /etc/ssl/cert.pem
COPY --from=builder /pkg/ /usr/
# make sure the binary can be executed
RUN %[10]s --version 2>/dev/null
RUN %[6]s --version 2>/dev/null
ARG BININFO_BUILD_DATE BININFO_COMMIT_HASH BININFO_VERSION
LABEL source_repository="%[6]s" \
org.opencontainers.image.url="%[6]s" \
LABEL source_repository="%[7]s" \
org.opencontainers.image.url="%[7]s" \
org.opencontainers.image.created=${BININFO_BUILD_DATE} \
org.opencontainers.image.revision=${BININFO_COMMIT_HASH} \
org.opencontainers.image.version=${BININFO_VERSION}
%[7]s%[8]sWORKDIR %[9]s
ENTRYPOINT [ %[10]s ]
`, core.DefaultGolangImagePrefix, core.DefaultAlpineImage, goBuildflags, addUserGroup, runCommands, cfg.Metadata.URL, extraDirectives, userCommand, workingDir, entrypoint)
%[8]s%[9]sWORKDIR %[10]s
ENTRYPOINT [ %[11]s ]
`, core.DefaultGolangImagePrefix, core.DefaultAlpineImage, goBuildflags, addUserGroup, runCommands, cfg.Binaries[0].Name, cfg.Metadata.URL, extraDirectives, userCommand, workingDir, entrypoint)

must.Succeed(os.WriteFile("Dockerfile", []byte(dockerfile), 0666))

Expand Down

0 comments on commit 3daefe9

Please sign in to comment.