Skip to content

Commit 282c663

Browse files
committed
Move back to COPY for copying configuration
1 parent f125ad2 commit 282c663

File tree

5 files changed

+64
-67
lines changed

5 files changed

+64
-67
lines changed

al2/x86_64/standard/2.0/Dockerfile

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ RUN set -ex \
6565
&& wget -qO ~/FirefoxSetup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64" \
6666
&& tar xjf ~/FirefoxSetup.tar.bz2 -C /opt/ \
6767
&& ln -s /opt/firefox/firefox /usr/local/bin/firefox \
68-
&& rm ~/FirefoxSetup.tar.bz2 \
69-
&& firefox --version
68+
&& rm ~/FirefoxSetup.tar.bz2
7069

7170
# Install GeckoDriver
7271
RUN set -ex \
@@ -162,7 +161,7 @@ ENV GOPATH="/go"
162161
FROM tools AS runtimes_1
163162

164163
#**************** JAVA ****************************************************
165-
RUN cat tools/android-accept-licenses.sh > /opt/tools/android-accept-licenses.sh && chmod 755 /opt/tools/android-accept-licenses.sh
164+
COPY tools/android-accept-licenses.sh /opt/tools/android-accept-licenses.sh
166165

167166
ENV JAVA_11_HOME="/opt/jvm/amazon-corretto-11" \
168167
JDK_11_HOME="/opt/jvm/amazon-corretto-11" \
@@ -332,7 +331,7 @@ ENV PYTHON_37_VERSION="3.7.10"
332331
ENV PYTHON_PIP_VERSION=21.1.2
333332
ENV PYYAML_VERSION=5.4.1
334333

335-
RUN cat tools/runtime_configs/python/$PYTHON_37_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_37_VERSION
334+
COPY tools/runtime_configs/python/$PYTHON_37_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_37_VERSION
336335
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_37_VERSION && rm -rf /tmp/*
337336
RUN pyenv global $PYTHON_37_VERSION
338337
RUN set -ex \
@@ -345,7 +344,7 @@ RUN set -ex \
345344
#**************** PHP ****************************************************
346345
ENV PHP_73_VERSION="7.3.13"
347346

348-
RUN cat tools/runtime_configs/php/$PHP_73_VERSION > /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_73_VERSION
347+
COPY tools/runtime_configs/php/$PHP_73_VERSION /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_73_VERSION
349348
RUN phpenv install $PHP_73_VERSION && rm -rf /tmp/* && phpenv global $PHP_73_VERSION
350349
RUN echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_73_VERSION/etc/conf.d/memory.ini"
351350

@@ -400,7 +399,7 @@ RUN set -ex \
400399
#Python 3.8
401400
ENV PYTHON_38_VERSION="3.8.10"
402401

403-
RUN cat tools/runtime_configs/python/$PYTHON_38_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_38_VERSION
402+
COPY tools/runtime_configs/python/$PYTHON_38_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_38_VERSION
404403
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_38_VERSION && rm -rf /tmp/*
405404
RUN pyenv global $PYTHON_38_VERSION
406405
RUN set -ex \
@@ -411,7 +410,7 @@ RUN set -ex \
411410
#Python 3.9
412411
ENV PYTHON_39_VERSION="3.9.5"
413412

414-
RUN cat tools/runtime_configs/python/$PYTHON_39_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_39_VERSION
413+
COPY tools/runtime_configs/python/$PYTHON_39_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_39_VERSION
415414
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_39_VERSION && rm -rf /tmp/*
416415
RUN pyenv global $PYTHON_39_VERSION
417416
RUN set -ex \
@@ -454,18 +453,18 @@ RUN pyenv global $PYTHON_38_VERSION
454453
RUN phpenv global $PHP_73_VERSION
455454
RUN rbenv global $RUBY_26_VERSION
456455
RUN goenv global $GOLANG_13_VERSION
456+
RUN firefox --version
457457

458458
ENV MAVEN_CONFIG=$MAVEN_CONFIG_HOME
459459
ENV DEBIAN_FRONTEND="noninteractive"
460460

461461
# Configure SSH
462-
RUN cat ssh_config > /root/.ssh/config
463-
RUN cat runtimes.yml > /codebuild/image/config/runtimes.yml
464-
RUN cat dockerd-entrypoint.sh > /usr/local/bin/dockerd-entrypoint.sh
465-
RUN chmod +x /usr/local/bin/dockerd-entrypoint.sh
466-
RUN cat legal/THIRD_PARTY_LICENSES.txt > /usr/share/doc/THIRD_PARTY_LICENSES.txt
467-
RUN cat legal/bill_of_material.txt > /usr/share/doc/bill_of_material.txt
468-
RUN cat amazon-ssm-agent.json > /etc/amazon/ssm/amazon-ssm-agent.json
462+
COPY ssh_config /root/.ssh/config
463+
COPY runtimes.yml /codebuild/image/config/runtimes.yml
464+
COPY dockerd-entrypoint.sh /usr/local/bin/
465+
COPY legal/THIRD_PARTY_LICENSES.txt /usr/share/doc
466+
COPY legal/bill_of_material.txt /usr/share/doc
467+
COPY amazon-ssm-agent.json /etc/amazon/ssm/
469468

470469
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh"]
471470

al2/x86_64/standard/3.0/Dockerfile

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ RUN set -ex \
6767
&& wget -qO ~/FirefoxSetup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64" \
6868
&& tar xjf ~/FirefoxSetup.tar.bz2 -C /opt/ \
6969
&& ln -s /opt/firefox/firefox /usr/local/bin/firefox \
70-
&& rm ~/FirefoxSetup.tar.bz2 \
71-
&& firefox --version
70+
&& rm ~/FirefoxSetup.tar.bz2
7271

7372
# Install GeckoDriver
7473
RUN set -ex \
@@ -165,7 +164,7 @@ ENV GOPATH="/go"
165164
FROM tools AS runtimes_1
166165

167166
#**************** JAVA ****************************************************
168-
RUN cat tools/android-accept-licenses.sh > /opt/tools/android-accept-licenses.sh && chmod 755 /opt/tools/android-accept-licenses.sh
167+
COPY tools/android-accept-licenses.sh /opt/tools/android-accept-licenses.sh
169168

170169
ENV JAVA_11_HOME="/usr/lib/jvm/java-11-amazon-corretto.x86_64" \
171170
JDK_11_HOME="/usr/lib/jvm/java-11-amazon-corretto.x86_64" \
@@ -327,7 +326,7 @@ ENV PYTHON_37_VERSION="3.7.10"
327326
ENV PYTHON_PIP_VERSION=21.1.2
328327
ENV PYYAML_VERSION=5.4.1
329328

330-
RUN cat tools/runtime_configs/python/$PYTHON_37_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_37_VERSION
329+
COPY tools/runtime_configs/python/$PYTHON_37_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_37_VERSION
331330
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_37_VERSION && rm -rf /tmp/*
332331
RUN pyenv global $PYTHON_37_VERSION
333332
RUN set -ex \
@@ -340,7 +339,7 @@ RUN set -ex \
340339
#**************** PHP ****************************************************
341340
ENV PHP_73_VERSION="7.3.19"
342341

343-
RUN cat tools/runtime_configs/php/$PHP_73_VERSION > /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_73_VERSION
342+
COPY tools/runtime_configs/php/$PHP_73_VERSION /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_73_VERSION
344343
RUN phpenv install $PHP_73_VERSION && rm -rf /tmp/* && phpenv global $PHP_73_VERSION
345344
RUN echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_73_VERSION/etc/conf.d/memory.ini"
346345

@@ -395,7 +394,7 @@ RUN set -ex \
395394
#Python 3.8
396395
ENV PYTHON_38_VERSION="3.8.10"
397396

398-
RUN cat tools/runtime_configs/python/$PYTHON_38_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_38_VERSION
397+
COPY tools/runtime_configs/python/$PYTHON_38_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_38_VERSION
399398
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_38_VERSION && rm -rf /tmp/*
400399
RUN pyenv global $PYTHON_38_VERSION
401400
RUN set -ex \
@@ -406,7 +405,7 @@ RUN set -ex \
406405
#Python 3.9
407406
ENV PYTHON_39_VERSION="3.9.5"
408407

409-
RUN cat tools/runtime_configs/python/$PYTHON_39_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_39_VERSION
408+
COPY tools/runtime_configs/python/$PYTHON_39_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_39_VERSION
410409
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_39_VERSION && rm -rf /tmp/*
411410
RUN pyenv global $PYTHON_39_VERSION
412411
RUN set -ex \
@@ -457,25 +456,27 @@ RUN goenv install $GOLANG_14_VERSION && rm -rf /tmp/* && goenv global $GOLANG_1
457456

458457
#Php 7.4
459458
ENV PHP_74_VERSION="7.4.7"
460-
RUN cat tools/runtime_configs/php/$PHP_74_VERSION > /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_74_VERSION
459+
COPY tools/runtime_configs/php/$PHP_74_VERSION /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_74_VERSION
461460
RUN phpenv install $PHP_74_VERSION && rm -rf /tmp/* && phpenv global $PHP_74_VERSION
462461
RUN echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_74_VERSION/etc/conf.d/memory.ini"
463462

464463
# Install Composer globally
465464
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
465+
466+
# Verify firefox install
467+
RUN firefox --version
466468
#**************** END PHP ****************************************************
467469

468470
#===================END of runtimes_3 ==============
469471
FROM runtimes_3 AS al2_v3
470472

471473
# Configure SSH
472-
RUN cat ssh_config > /root/.ssh/config
473-
RUN cat runtimes.yml > /codebuild/image/config/runtimes.yml
474-
RUN cat dockerd-entrypoint.sh > /usr/local/bin/dockerd-entrypoint.sh
475-
RUN chmod +x /usr/local/bin/dockerd-entrypoint.sh
476-
RUN cat legal/THIRD_PARTY_LICENSES.txt > /usr/share/doc/THIRD_PARTY_LICENSES.txt
477-
RUN cat legal/bill_of_material.txt > /usr/share/doc/bill_of_material.txt
478-
RUN cat amazon-ssm-agent.json > /etc/amazon/ssm/amazon-ssm-agent.json
474+
COPY ssh_config /root/.ssh/config
475+
COPY runtimes.yml /codebuild/image/config/runtimes.yml
476+
COPY dockerd-entrypoint.sh /usr/local/bin/
477+
COPY legal/THIRD_PARTY_LICENSES.txt /usr/share/doc
478+
COPY legal/bill_of_material.txt /usr/share/doc
479+
COPY amazon-ssm-agent.json /etc/amazon/ssm/
479480

480481
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh"]
481482

ubuntu/standard/3.0/Dockerfile

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -240,23 +240,23 @@ ENV PYTHON_39_VERSION="3.9.5" \
240240
ENV PYTHON_PIP_VERSION=21.1.2
241241
ENV PYYAML_VERSION=5.4.1
242242

243-
RUN cat tools/runtime_configs/python/$PYTHON_37_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_37_VERSION
243+
COPY tools/runtime_configs/python/$PYTHON_37_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_37_VERSION
244244
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_37_VERSION && rm -rf /tmp/*
245245
RUN pyenv global $PYTHON_37_VERSION
246246
RUN set -ex \
247247
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
248248
&& pip3 install --no-cache-dir --upgrade "PyYAML==$PYYAML_VERSION" \
249249
&& pip3 install --no-cache-dir --upgrade 'setuptools==57.4.0' wheel aws-sam-cli awscli boto3 pipenv virtualenv
250250

251-
RUN cat tools/runtime_configs/python/$PYTHON_38_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_38_VERSION
251+
COPY tools/runtime_configs/python/$PYTHON_38_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_38_VERSION
252252
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_38_VERSION && rm -rf /tmp/*
253253
RUN pyenv global $PYTHON_38_VERSION
254254
RUN set -ex \
255255
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
256256
&& pip3 install --no-cache-dir --upgrade "PyYAML==$PYYAML_VERSION" \
257257
&& pip3 install --no-cache-dir --upgrade 'setuptools==57.4.0' wheel aws-sam-cli awscli boto3 pipenv virtualenv
258258

259-
RUN cat tools/runtime_configs/python/$PYTHON_39_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_39_VERSION
259+
COPY tools/runtime_configs/python/$PYTHON_39_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_39_VERSION
260260
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_39_VERSION && rm -rf /tmp/*
261261
RUN pyenv global $PYTHON_39_VERSION
262262
RUN set -ex \
@@ -272,11 +272,11 @@ ENV PHP_74_VERSION="7.4.1" \
272272

273273
RUN curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-installer | bash
274274
ENV PATH="/root/.phpenv/shims:/root/.phpenv/bin:$PATH"
275-
RUN cat tools/runtime_configs/php/$PHP_73_VERSION > /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_73_VERSION
275+
COPY tools/runtime_configs/php/$PHP_73_VERSION /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_73_VERSION
276276
RUN phpenv install $PHP_73_VERSION && rm -rf /tmp/* && phpenv global $PHP_73_VERSION
277277
RUN echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_73_VERSION/etc/conf.d/memory.ini"
278278

279-
RUN cat tools/runtime_configs/php/$PHP_74_VERSION > /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_74_VERSION
279+
COPY tools/runtime_configs/php/$PHP_74_VERSION /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_74_VERSION
280280
RUN phpenv install $PHP_74_VERSION && rm -rf /tmp/* && phpenv global $PHP_74_VERSION
281281
RUN echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_74_VERSION/etc/conf.d/memory.ini"
282282

@@ -300,7 +300,7 @@ RUN go get -u github.com/golang/dep/cmd/dep
300300
FROM runtimes AS runtimes_n_openjdk
301301

302302
#**************** JAVA ****************************************************
303-
RUN cat tools/android-accept-licenses.sh > /opt/tools/android-accept-licenses.sh && chmod 755 /opt/tools/android-accept-licenses.sh
303+
COPY tools/android-accept-licenses.sh /opt/tools/android-accept-licenses.sh
304304

305305
ENV JAVA_11_HOME="/opt/jvm/openjdk-11" \
306306
JDK_11_HOME="/opt/jvm/openjdk-11" \
@@ -504,13 +504,12 @@ RUN rbenv global $RUBY_26_VERSION
504504
RUN goenv global $GOLANG_13_VERSION
505505

506506
# Configure SSH
507-
RUN cat ssh_config > /root/.ssh/config
508-
RUN cat runtimes.yml > /codebuild/image/config/runtimes.yml
509-
RUN cat dockerd-entrypoint.sh > /usr/local/bin/dockerd-entrypoint.sh
510-
RUN chmod +x /usr/local/bin/dockerd-entrypoint.sh
511-
RUN cat legal/THIRD_PARTY_LICENSES.txt > /usr/share/doc/THIRD_PARTY_LICENSES.txt
512-
RUN cat legal/bill_of_material.txt > /usr/share/doc/bill_of_material.txt
513-
RUN cat amazon-ssm-agent.json > /etc/amazon/ssm/amazon-ssm-agent.json
507+
COPY ssh_config /root/.ssh/config
508+
COPY runtimes.yml /codebuild/image/config/runtimes.yml
509+
COPY dockerd-entrypoint.sh /usr/local/bin/
510+
COPY legal/THIRD_PARTY_LICENSES.txt /usr/share/doc
511+
COPY legal/bill_of_material.txt /usr/share/doc
512+
COPY amazon-ssm-agent.json /etc/amazon/ssm/
514513

515514
ENTRYPOINT ["dockerd-entrypoint.sh"]
516515

ubuntu/standard/4.0/Dockerfile

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -248,23 +248,23 @@ ENV PYTHON_39_VERSION="3.9.5" \
248248
ENV PYTHON_PIP_VERSION=21.1.2
249249
ENV PYYAML_VERSION=5.4.1
250250

251-
RUN cat tools/runtime_configs/python/$PYTHON_37_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_37_VERSION
251+
COPY tools/runtime_configs/python/$PYTHON_37_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_37_VERSION
252252
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_37_VERSION && rm -rf /tmp/*
253253
RUN pyenv global $PYTHON_37_VERSION
254254
RUN set -ex \
255255
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
256256
&& pip3 install --no-cache-dir --upgrade "PyYAML==$PYYAML_VERSION" \
257257
&& pip3 install --no-cache-dir --upgrade 'setuptools==57.4.0' wheel aws-sam-cli awscli boto3 pipenv virtualenv --use-feature=2020-resolver
258258

259-
RUN cat tools/runtime_configs/python/$PYTHON_38_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_38_VERSION
259+
COPY tools/runtime_configs/python/$PYTHON_38_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_38_VERSION
260260
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_38_VERSION && rm -rf /tmp/*
261261
RUN pyenv global $PYTHON_38_VERSION
262262
RUN set -ex \
263263
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
264264
&& pip3 install --no-cache-dir --upgrade "PyYAML==$PYYAML_VERSION" \
265265
&& pip3 install --no-cache-dir --upgrade 'setuptools==57.4.0' wheel aws-sam-cli awscli boto3 pipenv virtualenv --use-feature=2020-resolver
266266

267-
RUN cat tools/runtime_configs/python/$PYTHON_39_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_39_VERSION
267+
COPY tools/runtime_configs/python/$PYTHON_39_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_39_VERSION
268268
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_39_VERSION && rm -rf /tmp/*
269269
RUN pyenv global $PYTHON_39_VERSION
270270
RUN set -ex \
@@ -280,11 +280,11 @@ ENV PHP_74_VERSION="7.4.7" \
280280

281281
RUN curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-installer | bash
282282
ENV PATH="/root/.phpenv/shims:/root/.phpenv/bin:$PATH"
283-
RUN cat tools/runtime_configs/php/$PHP_73_VERSION > /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_73_VERSION
283+
COPY tools/runtime_configs/php/$PHP_73_VERSION /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_73_VERSION
284284
RUN phpenv install $PHP_73_VERSION && rm -rf /tmp/* && phpenv global $PHP_73_VERSION
285285
RUN echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_73_VERSION/etc/conf.d/memory.ini"
286286

287-
RUN cat tools/runtime_configs/php/$PHP_74_VERSION > /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_74_VERSION
287+
COPY tools/runtime_configs/php/$PHP_74_VERSION /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_74_VERSION
288288
RUN phpenv install $PHP_74_VERSION && rm -rf /tmp/* && phpenv global $PHP_74_VERSION
289289
RUN echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_74_VERSION/etc/conf.d/memory.ini"
290290

@@ -308,7 +308,7 @@ RUN go get -u github.com/golang/dep/cmd/dep
308308
FROM runtimes AS runtimes_n_corretto
309309

310310
#**************** JAVA ****************************************************
311-
RUN cat tools/android-accept-licenses.sh > /opt/tools/android-accept-licenses.sh && chmod 755 /opt/tools/android-accept-licenses.sh
311+
COPY tools/android-accept-licenses.sh /opt/tools/android-accept-licenses.sh
312312

313313
ENV JAVA_11_HOME="/usr/lib/jvm/java-11-amazon-corretto" \
314314
JDK_11_HOME="/usr/lib/jvm/java-11-amazon-corretto" \
@@ -480,13 +480,12 @@ RUN phpenv global $PHP_74_VERSION
480480
RUN rbenv global $RUBY_27_VERSION
481481

482482
# Configure SSH
483-
RUN cat ssh_config > /root/.ssh/config
484-
RUN cat runtimes.yml > /codebuild/image/config/runtimes.yml
485-
RUN cat dockerd-entrypoint.sh > /usr/local/bin/dockerd-entrypoint.sh
486-
RUN chmod +x /usr/local/bin/dockerd-entrypoint.sh
487-
RUN cat legal/THIRD_PARTY_LICENSES.txt > /usr/share/doc/THIRD_PARTY_LICENSES.txt
488-
RUN cat legal/bill_of_material.txt > /usr/share/doc/bill_of_material.txt
489-
RUN cat amazon-ssm-agent.json > /etc/amazon/ssm/amazon-ssm-agent.json
483+
COPY ssh_config /root/.ssh/config
484+
COPY runtimes.yml /codebuild/image/config/runtimes.yml
485+
COPY dockerd-entrypoint.sh /usr/local/bin/
486+
COPY legal/THIRD_PARTY_LICENSES.txt /usr/share/doc
487+
COPY legal/bill_of_material.txt /usr/share/doc
488+
COPY amazon-ssm-agent.json /etc/amazon/ssm/
490489

491490
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh"]
492491

0 commit comments

Comments
 (0)