|
27 | 27 | RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
28 | 28 | locale-gen
|
29 | 29 |
|
30 |
| -ENV LC_ALL en_US.UTF-8 |
31 |
| -ENV LANG en_US.UTF-8 |
32 |
| -ENV LANGUAGE en_US.UTF-8 |
| 30 | +ENV LC_ALL=en_US.UTF-8 \ |
| 31 | + LANG=en_US.UTF-8 \ |
| 32 | + LANGUAGE=en_US.UTF-8 |
33 | 33 |
|
34 | 34 | # Use bash as default shell, rather than sh
|
35 |
| -ENV SHELL /bin/bash |
| 35 | +ENV SHELL=/bin/bash |
36 | 36 |
|
37 | 37 | # Set up user
|
38 | 38 | ARG NB_USER
|
39 | 39 | ARG NB_UID
|
40 |
| -ENV USER ${NB_USER} |
41 |
| -ENV HOME /home/${NB_USER} |
| 40 | +ENV USER=${NB_USER} \ |
| 41 | + HOME=/home/${NB_USER} |
42 | 42 |
|
43 | 43 | RUN groupadd \
|
44 | 44 | --gid ${NB_UID} \
|
|
81 | 81 | {% if build_env -%}
|
82 | 82 | # Environment variables required for build
|
83 | 83 | {% for item in build_env -%}
|
84 |
| -ENV {{item[0]}} {{item[1]}} |
| 84 | +ENV {{item[0]}}={{item[1]}} |
85 | 85 | {% endfor -%}
|
86 | 86 | {% endif -%}
|
87 | 87 |
|
88 | 88 | {% if path -%}
|
89 | 89 | # Special case PATH
|
90 |
| -ENV PATH {{ ':'.join(path) }}:${PATH} |
| 90 | +ENV PATH={{ ':'.join(path) }}:${PATH} |
91 | 91 | {% endif -%}
|
92 | 92 |
|
93 | 93 | {% if build_script_files -%}
|
|
105 | 105 |
|
106 | 106 | # Allow target path repo is cloned to be configurable
|
107 | 107 | ARG REPO_DIR=${HOME}
|
108 |
| -RUN [ ! -d ${REPO_DIR} ] \ |
109 |
| - && mkdir -p ${REPO_DIR} \ |
110 |
| - && chown -R ${NB_USER}:${NB_USER} ${REPO_DIR} |
| 108 | +ENV REPO_DIR=${REPO_DIR} |
| 109 | +RUN if [ ! -d "${REPO_DIR}" ] \ |
| 110 | + ; then \ |
| 111 | + mkdir -p "${REPO_DIR}" \ |
| 112 | + && chown -R ${NB_USER}:${NB_USER} "${REPO_DIR}" \ |
| 113 | + ; else \ |
| 114 | + echo "${REPO_DIR} already exists..." \ |
| 115 | + ; fi |
| 116 | +
|
111 | 117 | WORKDIR ${REPO_DIR}
|
112 | 118 | RUN chown ${NB_USER}:${NB_USER} ${REPO_DIR}
|
113 | 119 |
|
|
119 | 125 | #
|
120 | 126 | # The XDG standard suggests ~/.local/bin as the path for local user-specific
|
121 | 127 | # installs. See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
122 |
| -ENV PATH ${HOME}/.local/bin:${REPO_DIR}/.local/bin:${PATH} |
| 128 | +ENV PATH=${HOME}/.local/bin:${REPO_DIR}/.local/bin:${PATH} |
123 | 129 |
|
124 | 130 | {% if env -%}
|
125 | 131 | # The rest of the environment
|
126 | 132 | {% for item in env -%}
|
127 |
| -ENV {{item[0]}} {{item[1]}} |
| 133 | +ENV {{item[0]}}={{item[1]}} |
128 | 134 | {% endfor -%}
|
129 | 135 | {% endif -%}
|
130 | 136 |
|
|
175 | 181 | # Add start script
|
176 | 182 | {% if start_script is not none -%}
|
177 | 183 | RUN chmod +x "{{ start_script }}"
|
178 |
| -ENV R2D_ENTRYPOINT "{{ start_script }}" |
| 184 | +ENV R2D_ENTRYPOINT="{{ start_script }}" |
179 | 185 | {% endif -%}
|
180 | 186 |
|
181 | 187 | # Add entrypoint
|
|
0 commit comments