Skip to content

Commit

Permalink
feat: move images to their own folder
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 17, 2023
1 parent ff0906b commit 3c061f0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ services:
web:
image: docker.io/library/httpd:2.4.57-alpine3.17
volumes:
- ./sztp-server/config/my-boot-image.img:/usr/local/apache2/htdocs/my-boot-image.img
- ./sztp-server/images:/usr/local/apache2/htdocs
ports:
- 80:80
networks:
Expand Down
2 changes: 1 addition & 1 deletion scripts/change_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sleep 5
docker-compose ps

# define values
BOOT_IMG_FULL_PATH=../sztp-server/conf/my-second-boot-image.img
BOOT_IMG_FULL_PATH=../sztp-server/images/my-second-boot-image.img
BOOTSTRAP_URL=http://localhost:7080/restconf/ds/ietf-datastores:running
BOOT_IMG_PATH=$(basename ${BOOT_IMG_FULL_PATH})
BOOT_IMG_HASH_VAL=`openssl dgst -sha256 -c ${BOOT_IMG_FULL_PATH} | awk '{print $2}'`
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion sztp-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ RUN echo "DNS.2 = bootstrap" >> sztpd1/sbi/end-entity/openssl.cnf && \

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

# generate static template

Expand All @@ -35,7 +36,7 @@ RUN \
BOOTSVR_TA_CERT_B64=`openssl enc -base64 -A -in /tmp/ta_cert_chain.cms` \
CLIENT_CERT_TA_B64=`openssl enc -base64 -A -in /tmp/ta_cert_chain.cms` \
envsubst '$CLIENT_CERT_TA_B64,$SBI_PRI_KEY_B64,$SBI_PUB_KEY_B64,$SBI_EE_CERT_B64,$BOOTSVR_TA_CERT_B64' < /tmp/sztpd.redirect.json.template > /tmp/redirect.json.static && \
BOOT_IMG_HASH_VAL=`openssl dgst -sha256 -c /tmp/my-boot-image.img | awk '{print $2}'` \
BOOT_IMG_HASH_VAL=`openssl dgst -sha256 -c /media/my-boot-image.img | awk '{print $2}'` \
PRE_SCRIPT_B64=`openssl enc -base64 -A -in /tmp/my-pre-configuration-script.sh` \
POST_SCRIPT_B64=`openssl enc -base64 -A -in /tmp/my-post-configuration-script.sh` \
CONFIG_B64=`openssl enc -base64 -A -in /tmp/my-configuration.xml` \
Expand Down

0 comments on commit 3c061f0

Please sign in to comment.