Skip to content

Commit 0a920df

Browse files
Lint dockerfiles (#902)
Co-authored-by: Roberto Pastor Muela <[email protected]>
1 parent b9a3f9f commit 0a920df

File tree

4 files changed

+27
-6
lines changed

4 files changed

+27
-6
lines changed

.github/workflows/ci_cd.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ jobs:
6161
operating-system: ${{ matrix.os }}
6262
python-version: ${{ matrix.python-version }}
6363

64+
docker-style:
65+
name: Docker Style Check
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: PyAnsys documentation style checks
69+
uses: ansys/actions/docker-style@v5
70+
with:
71+
directory: docker
72+
recursive: true
73+
6474
# =================================================================================================
6575
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
6676
# =================================================================================================

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@
1818
* [Maxime Rey](https://github.com/MaxJPRey)
1919
* [Revathy Venugopal](https://github.com/Revathyvenugopal162)
2020
* [Riccardo Manno](https://github.com/rmanno91)
21+
* [Sebastien Morais](https://github.com/SMoraisAnsys)
2122
* [Umut Soysal](https://github.com/umutsoysal)

docker/Dockerfile.linux renamed to docker/linux/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@ FROM mcr.microsoft.com/dotnet/aspnet:6.0
77
WORKDIR /app
88

99
# Install unzip
10-
RUN apt-get update && apt-get install -y unzip
10+
RUN apt-get update && \
11+
apt-get install -y --no-install-recommends unzip=6.0-26+deb11u1 && \
12+
rm -rf /var/lib/apt/lists/*
1113

1214
# Add the binary files from the latest release
1315
COPY linux-binaries.zip .
14-
RUN unzip -qq linux-binaries.zip -d . && rm linux-binaries.zip && chmod -R 0755 DockerLinux && mv DockerLinux/bin/x64/Release_Linux/net6.0/* . && rm -rf DockerLinux
16+
RUN unzip -qq linux-binaries.zip -d . && \
17+
rm linux-binaries.zip && \
18+
chmod -R 0755 DockerLinux && \
19+
mv DockerLinux/bin/x64/Release_Linux/net6.0/* . && \
20+
rm -rf DockerLinux
1521

1622
# Let the dynamic link loader where to search for shared libraries
1723
ENV LD_LIBRARY_PATH="/app"

docker/Dockerfile.windows renamed to docker/windows/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# hadolint shell = cmd.exe
2+
#
13
# Geometry service Windows-based Dockerfile
24
#
35
# Based on mcr.microsoft.com/dotnet/framework/runtime:4.7.2-windowsservercore-ltsc2019
@@ -15,10 +17,12 @@ WORKDIR /app
1517

1618
# Add the binary files from the latest release
1719
COPY windows-binaries.zip .
18-
RUN mkdir tmp_folder && tar -xf windows-binaries.zip -C tmp_folder
19-
RUN xcopy "tmp_folder\DockerWindows\bin\x64\Release_Headless\net472\*" ".\" /s /e /i /h
20-
RUN xcopy "tmp_folder\DockerWindows\*" ".\"
21-
RUN del windows-binaries.zip && rmdir /s /q tmp_folder
20+
RUN mkdir tmp_folder && \
21+
tar -xf windows-binaries.zip -C tmp_folder && \
22+
xcopy tmp_folder\DockerWindows\bin\x64\Release_Headless\net472\* . /e /i /h && \
23+
xcopy tmp_folder\DockerWindows\* . && \
24+
del windows-binaries.zip && \
25+
rmdir /s /q tmp_folder
2226

2327
# Defining environment variables
2428
ENV LICENSE_SERVER=""

0 commit comments

Comments
 (0)