Skip to content

Commit

Permalink
ci: fix docker linter errors
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
  • Loading branch information
glimchb committed Oct 6, 2022
1 parent f6a900a commit 9799084
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: hadolint/hadolint-action@v2.1.0
with:
recursive: true
ignore: DL3041
ignore: DL3041,DL3008
dockerfile: Dockerfile.${{ matrix.package }}

shellcheck:
Expand Down
14 changes: 7 additions & 7 deletions Dockerfile.agent
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM docker.io/library/python:3.10.7-slim

RUN apt update && apt install -y libyang-tools libxml2-utils make curl && rm -rf /var/lib/apt/lists/*
RUN apt update && apt install -y --no-install-recommends libyang-tools libxml2-utils make curl && rm -rf /var/lib/apt/lists/*

# certificates
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
RUN curl -kL https://watsen.net/support/sztpd-simulator-0.0.11.tgz | tar -zxvf - -C /tmp/
WORKDIR /tmp/sztpd-simulator/pki
RUN sed -i 's/localhost/bootstrap/g' sztpd1/sbi/end-entity/openssl.cnf
RUN make pki
RUN sed -i "s/localhost/bootstrap/g" sztpd1/sbi/end-entity/openssl.cnf && \
make pki && \
echo # create trust chain && \
cat sztpd1/sbi/root-ca/my_cert.pem sztpd1/sbi/intermediate1/my_cert.pem > /opi.pem

# create trust chain
RUN cat sztpd1/sbi/root-ca/my_cert.pem sztpd1/sbi/intermediate1/my_cert.pem > /opi.pem

CMD ['/bin/sh', '-c', 'sleep infinity']
CMD ["/bin/sh", "-c", "sleep infinity"]
28 changes: 14 additions & 14 deletions Dockerfile.bootstrap
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
FROM docker.io/library/python:3.10.7-slim

RUN apt-get update && apt-get install -y gettext libsqlite3-dev make curl && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends gettext libsqlite3-dev make curl && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir sztpd==0.0.11

# certificates
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
RUN curl -kL https://watsen.net/support/sztpd-simulator-0.0.11.tgz | tar -zxvf - -C /tmp/
WORKDIR /tmp/sztpd-simulator/pki
RUN sed -i 's/localhost/bootstrap/g' sztpd1/sbi/end-entity/openssl.cnf
RUN make pki

# SBI Port certificates
RUN cat sztpd1/sbi/end-entity/my_cert.pem sztpd1/sbi/intermediate2/my_cert.pem > /tmp/cert_chain.pem
RUN openssl crl2pkcs7 -nocrl -certfile /tmp/cert_chain.pem -outform DER -out /tmp/cert_chain.cms

# client cert (DevID) trust anchor
RUN cat client/root-ca/my_cert.pem client/intermediate1/my_cert.pem client/intermediate2/my_cert.pem > /tmp/ta_cert_chain.pem
RUN openssl crl2pkcs7 -nocrl -certfile /tmp/ta_cert_chain.pem -outform DER -out /tmp/ta_cert_chain.cms

# TODO: remove this line and run test from agent container instead
RUN cat sztpd1/sbi/root-ca/my_cert.pem sztpd1/sbi/intermediate1/my_cert.pem > /opi.pem
RUN sed -i 's/localhost/bootstrap/g' sztpd1/sbi/end-entity/openssl.cnf && \
make pki && \
echo # SBI Port certificates && \
cat sztpd1/sbi/end-entity/my_cert.pem sztpd1/sbi/intermediate2/my_cert.pem > /tmp/cert_chain.pem && \
openssl crl2pkcs7 -nocrl -certfile /tmp/cert_chain.pem -outform DER -out /tmp/cert_chain.cms && \
echo # client cert (DevID) trust anchor && \
cat client/root-ca/my_cert.pem client/intermediate1/my_cert.pem client/intermediate2/my_cert.pem > /tmp/ta_cert_chain.pem && \
openssl crl2pkcs7 -nocrl -certfile /tmp/ta_cert_chain.pem -outform DER -out /tmp/ta_cert_chain.cms && \
echo # TODO: remove this line and run test from agent container instead && \
cat sztpd1/sbi/root-ca/my_cert.pem sztpd1/sbi/intermediate1/my_cert.pem > /opi.pem

# configurations, images, templates
COPY config/ /tmp/

# generate static template

# hadolint ignore=SC2016
RUN \
BOOT_IMG_HASH_VAL=`openssl dgst -sha256 -c /tmp/my-boot-image.img | awk '{print $2}'` \
PRE_SCRIPT_B64=`openssl enc -base64 -A -in /tmp/my-pre-configuration-script.sh` \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.client
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/fedora:36
RUN dnf install -y dhclient
RUN dnf install -y dhclient && dnf clean all
COPY ./dhclient.conf /etc/dhcp/
CMD ["dhclient", "-d", "-v"]
2 changes: 1 addition & 1 deletion Dockerfile.dhcp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/fedora:36
RUN dnf install -y dhcp-server gettext
RUN dnf install -y dhcp-server gettext && dnf clean all
COPY ./dhcpd.conf.template /etc/dhcp/
CMD ["dhcpd", "-d"]

0 comments on commit 9799084

Please sign in to comment.