Skip to content

Commit 4cd728a

Browse files
Renamed & Parameterized Release_Year in DockerFile (#15)
* Updated to take LV_YEAR as ARG * Rename Dockerfile to Dockerfile-jammy-pro * Update Dockerfile-jammy-pro
1 parent d811054 commit 4cd728a

File tree

1 file changed

+37
-29
lines changed

1 file changed

+37
-29
lines changed

examples/build-your-own-image/Dockerfile renamed to examples/build-your-own-image/Dockerfile-jammy-pro

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
# Base image for this is ubuntu 22.04
66
FROM ubuntu:22.04
77

8+
# -------------------------------
9+
# Handle LabVIEW year properly
10+
# -------------------------------
11+
# ARG is for build-time (can be overridden with --build-arg)
12+
# ENV makes it available inside RUN and in the container
13+
ARG LV_YEAR=2026
14+
ENV LV_YEAR=${LV_YEAR}
15+
816
# Enable CICD Features
917
ENV EnableCICDFeaturesForLabVIEW=TRUE
1018

@@ -13,15 +21,15 @@ ENV USER=root
1321

1422
# Install absolutely needed dependencies
1523
RUN apt-get update && \
16-
apt-get install -y \
17-
ca-certificates \
18-
desktop-file-utils \
19-
gtk-update-icon-cache \
20-
libglu1-mesa \
21-
libx11-6 \
22-
libxinerama1 \
23-
xvfb
24-
24+
apt-get install -y \
25+
ca-certificates \
26+
desktop-file-utils \
27+
gtk-update-icon-cache \
28+
libglu1-mesa \
29+
libx11-6 \
30+
libxinerama1 \
31+
xvfb
32+
2533
# Fix permission issues for X11
2634
RUN mkdir -p /tmp/.X11-unix && chmod 1777 /tmp/.X11-unix
2735

@@ -30,39 +38,39 @@ RUN mkdir -p /home/execs/
3038

3139
# Copy LabVIEW Installer and CEIP Default settings.json
3240
COPY Installer/* /home/execs/
33-
34-
########################################################################################################################################################################################
41+
42+
########################################################################################################################################################################################
3543
# Install and Setup LabVIEW
3644
########################################################################################################################################################################################
3745

3846
# Install LabVIEW Pro, LabVIEWCLI, CEIP and VI Analyzer Toolkit
39-
RUN apt-get install -y /home/execs/ni-labview-2025.deb && \
40-
apt-get update && \
41-
apt-get install -y \
42-
ni-labview-2025-pro \
43-
ni-labview-command-line-interface \
44-
ni-ceip \
45-
ni-vialinux-labview-support
46-
47+
RUN apt-get install -y /home/execs/ni-labview-${LV_YEAR}.deb && \
48+
apt-get update && \
49+
apt-get install -y \
50+
ni-labview-${LV_YEAR}-pro \
51+
ni-labview-command-line-interface \
52+
ni-ceip \
53+
ni-vialinux-labview-support
54+
4755
# Set necessary INI Tokens to support LabVIEWCLI
4856
# Enable VI Server
49-
RUN mkdir -p /root/natinst/.config/LabVIEW-2025 && \
50-
echo "server.tcp.enabled=True" >> /root/natinst/.config/LabVIEW-2025/labviewprofull.conf && \
51-
echo "server.tcp.enabled=True" >> /root/natinst/.config/LabVIEW-2025/labview.conf && \
52-
echo "server.tcp.enabled=True" >> /root/natinst/.config/LabVIEW-2025/labview64.conf
57+
RUN mkdir -p /root/natinst/.config/LabVIEW-${LV_YEAR} && \
58+
echo "server.tcp.enabled=True" >> /root/natinst/.config/LabVIEW-${LV_YEAR}/labviewprofull.conf && \
59+
echo "server.tcp.enabled=True" >> /root/natinst/.config/LabVIEW-${LV_YEAR}/labview.conf && \
60+
echo "server.tcp.enabled=True" >> /root/natinst/.config/LabVIEW-${LV_YEAR}/labview64.conf
5361

5462
# Set unattended token
55-
RUN echo "unattended=True" >> /root/natinst/.config/LabVIEW-2025/labviewprofull.conf && \
56-
echo "unattended=True" >> /root/natinst/.config/LabVIEW-2025/labview.conf && \
57-
echo "unattended=True" >> /root/natinst/.config/LabVIEW-2025/labview64.conf
58-
63+
RUN echo "unattended=True" >> /root/natinst/.config/LabVIEW-${LV_YEAR}/labviewprofull.conf && \
64+
echo "unattended=True" >> /root/natinst/.config/LabVIEW-${LV_YEAR}/labview.conf && \
65+
echo "unattended=True" >> /root/natinst/.config/LabVIEW-${LV_YEAR}/labview64.conf
66+
5967
# Enable CEIP Logging and Sending
6068
RUN mv -f /home/execs/settings.json /var/local/natinst/udc && \
61-
chmod 666 /var/local/natinst/udc/settings.json
69+
chmod 666 /var/local/natinst/udc/settings.json
6270

6371
########################################################################################################################################################################################
6472
# Cleanup
6573
########################################################################################################################################################################################
6674

6775
# Remove installer and settings.json
68-
RUN rm -rf /home/execs/
76+
RUN rm -rf /home/execs/

0 commit comments

Comments
 (0)