Skip to content

Commit

Permalink
Update linting rules, test nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Nov 7, 2024
1 parent 9bbc8d3 commit 3f3764d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
- uses: hadolint/[email protected]
with:
dockerfile: ${{ inputs.dockerfile-location }}/Dockerfile
ignore: SC1091,${{ inputs.ignore-linting-rules }}
ignore: ${{ inputs.ignore-linting-rules }}

- name: ShellCheck
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
uses: ./.github/actions/lint
with:
dockerfile-location: ${{ env.DOCKERFILE_LOCATION }}
ignore-linting-rules: DL3002,DL3006

- name: Test Docker image build
id: build
Expand Down Expand Up @@ -106,7 +105,7 @@ jobs:
uses: ./.github/actions/lint
with:
dockerfile-location: ${{ env.DOCKERFILE_LOCATION }}
ignore-linting-rules: DL3002,DL3006
ignore-linting-rules: DL3002

- name: Test Docker image build
id: build
Expand Down Expand Up @@ -282,7 +281,7 @@ jobs:
uses: ./.github/actions/lint
with:
dockerfile-location: ${{ env.DOCKERFILE_LOCATION }}
ignore-linting-rules: DL3002,DL3006
ignore-linting-rules: DL3002

- name: Test Docker image build
id: build
Expand Down
9 changes: 6 additions & 3 deletions docker/tna-python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ ENV POETRY_HOME=/home/app/.local \
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# ==========================================
# 1.
# Update the package index files and install
# specific versions of libcurl4, curl, build
# essentials (which then enables us to later
Expand Down Expand Up @@ -122,7 +121,6 @@ RUN set -eux; \
# container
# ==========================================
RUN ufw allow 'Nginx HTTPS'; \
rm /etc/nginx/conf.d/default.conf; \
mkdir /etc/nginx/ssl; \
openssl req -x509 -noenc -newkey rsa:2048 -keyout /etc/nginx/ssl/key.pem -out /etc/nginx/ssl/req.pem -days 90 -subj "/C=GB/ST=London/L=Kew/O=The National Archives/OU=Digital/CN=localhost"

Expand Down Expand Up @@ -150,6 +148,11 @@ RUN mkdir -p /app; \
# ==========================================
COPY lib/nginx.conf /etc/nginx/nginx.conf

# ==========================================
# Test the installed nginx configuration
# ==========================================
RUN nginx -t

# ==========================================
# Set $HOME env var to be the home directory
# of our new app user so we can install libs
Expand Down Expand Up @@ -199,7 +202,7 @@ FROM root AS app
USER app



# hadolint ignore=DL3006
FROM "$USER_IMAGE"

# ==========================================
Expand Down

0 comments on commit 3f3764d

Please sign in to comment.