kendo-ui-license activation in Docker

2 Answers 268 Views
General Discussions
Ambarish
Top achievements
Rank 1
Iron
Ambarish asked on 10 Jul 2024, 10:56 PM

Hi,

The license key works when i activate locally on my machine but it does not when trying the same with Dockerfile. Here's the dockerfile code:

# base image
FROM node:18.17.0 as build
# set working directory
WORKDIR /app
# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH
ARG KENDO_UI_LICENSE_KEY

ENV KENDO_UI_LICENSE= ${KENDO_UI_LICENSE_KEY}

RUN echo ${KENDO_UI_LICENSE_KEY} > kendo-ui-license.txt

RUN npm install

COPY . /app

RUN npx kendo-ui-license activate

 

RUN ng build --prod

FROM nginx:1.17.4-alpine
## Remove default Nginx website
RUN rm -rf /usr/share/nginx/html/*
# copy artifact build from the 'build environment'
COPY --from=build /app/dist/ui/ /usr/share/nginx/html

 

The docker build gave the following error. Please help. The signature is valid as I have activated the same

llicense key on local machine.

=> [build  9/11] COPY . /app                                                                                     17.9s
 => ERROR [build 10/11] RUN npx kendo-ui-license activate                                                          1.0s
------
 > [build 10/11] RUN npx kendo-ui-license activate:
0.939 (INFO) Kendo UI: Reading license from KENDO_UI_LICENSE environment variable...
0.941 (ERROR) Kendo UI: License key signature is not valid. Please, download a new copy of the license and try again.
------

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Ambarish
Top achievements
Rank 1
Iron
answered on 22 Jul 2024, 10:56 AM
i figured it out. The secret needs to be in the build pipeline’s variable and not in library group variable. For soem reason storing it as a secret in library group doesnt work but storing it as a pipeline secret variable works. Hope this helps others
Martin Bechev
Telerik team
commented on 23 Jul 2024, 10:26 AM

Hi Ambarish,

Thank you for the provided details and shared experience.

I believe this would help others who ended up in a similar situation. 

Regards.

0
Martin Bechev
Telerik team
answered on 15 Jul 2024, 07:32 AM

Hi Ambarish,

Ensure that the license key stored in the env variable is valid. To verify this, I would suggest downloading it from here:

https://www.telerik.com/kendo-angular-ui/components/my-license/#toc-downloading-the-license-key

In case the license is activated, but you still see the banner and watermark, consider clearing the cache before activating the license:

https://www.telerik.com/kendo-angular-ui/components/my-license/#toc-i-renewed-my-license-key-but-still-seeing-the-invalid-license-attributes-what-should-i-do

or follow the steps from this article:

https://www.telerik.com/kendo-angular-ui/components/knowledge-base/license-troubleshooting-activation-warning-watermark/

Another approach that helps other customers is to perform some of the actions in a single step for example putting the angular cache clean, license activation, and angular build all into one step.

Regards,
Martin Bechev
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Dizjonk
Top achievements
Rank 1
commented on 22 Jul 2024, 10:23 AM

thank you!
Tags
General Discussions
Asked by
Ambarish
Top achievements
Rank 1
Iron
Answers by
Ambarish
Top achievements
Rank 1
Iron
Martin Bechev
Telerik team
Share this question
or