Use a single RUN command
Run test file creation in single RUN command. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
9cc0d1f073
commit
392f604eba
@ -26,12 +26,12 @@ RUN cmd.exe /c "@echo off && FOR %i in (%BUSYBOX_EXES%) do (mklink %i.exe busybo
|
|||||||
|
|
||||||
USER ContainerUser
|
USER ContainerUser
|
||||||
|
|
||||||
RUN mkdir C:\test_dir
|
|
||||||
# Explicitly set full access rights for "CREATOR OWNER". While
|
# Explicitly set full access rights for "CREATOR OWNER". While
|
||||||
# this is set by default for Windows Server 2019, it seems that
|
# this is set by default for Windows Server 2019, it seems that
|
||||||
# on Windows Server 2022 it is not.
|
# on Windows Server 2022 it is not.
|
||||||
RUN icacls C:\test_dir /grant "CREATOR OWNER":(OI)(CI)(IO)F /T
|
RUN mkdir C:\test_dir && \
|
||||||
RUN /bin/sh.exe -c "echo test_content > /test_dir/test_file"
|
icacls C:\test_dir /grant "CREATOR OWNER":(OI)(CI)(IO)F /T && \
|
||||||
|
/bin/sh.exe -c "echo test_content > /test_dir/test_file"
|
||||||
|
|
||||||
ENV PATH="C:\bin;C:\Windows\System32;C:\Windows;"
|
ENV PATH="C:\bin;C:\Windows\System32;C:\Windows;"
|
||||||
VOLUME "C:/test_dir"
|
VOLUME "C:/test_dir"
|
||||||
|
@ -27,14 +27,13 @@ RUN cmd.exe /c "@echo off && FOR %i in (%BUSYBOX_EXES%) do (mklink %i.exe busybo
|
|||||||
|
|
||||||
USER ContainerUser
|
USER ContainerUser
|
||||||
|
|
||||||
RUN mkdir C:\volumes
|
|
||||||
# Explicitly set full access rights for "CREATOR OWNER". While
|
# Explicitly set full access rights for "CREATOR OWNER". While
|
||||||
# this is set by default for Windows Server 2019, it seems that
|
# this is set by default for Windows Server 2019, it seems that
|
||||||
# on Windows Server 2022 it is not.
|
# on Windows Server 2022 it is not.
|
||||||
RUN icacls C:\volumes /grant "CREATOR OWNER":(OI)(CI)(IO)F /T
|
RUN mkdir C:\volumes && \
|
||||||
|
icacls C:\volumes /grant "CREATOR OWNER":(OI)(CI)(IO)F /T && \
|
||||||
RUN mkdir C:\volumes\test_dir
|
mkdir C:\volumes\test_dir && \
|
||||||
RUN /bin/sh.exe -c "echo test_content > /volumes/test_dir/test_file"
|
/bin/sh.exe -c "echo test_content > /volumes/test_dir/test_file"
|
||||||
|
|
||||||
ENV PATH="C:\bin;C:\Windows\System32;C:\Windows;"
|
ENV PATH="C:\bin;C:\Windows\System32;C:\Windows;"
|
||||||
VOLUME "C:/volumes/test_dir"
|
VOLUME "C:/volumes/test_dir"
|
||||||
|
Loading…
Reference in New Issue
Block a user