Skip to content

Commit

Permalink
feat: add helper script to extract keys
Browse files Browse the repository at this point in the history
when installing curl ignore certificates

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
  • Loading branch information
glimchb committed Oct 12, 2023
1 parent 2f82669 commit 1d1cd6c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
21 changes: 21 additions & 0 deletions scripts/keys.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2022 Dell Inc, or its subsidiaries.

set -euxo pipefail

# docker compose plugin
command -v docker-compose || { shopt -s expand_aliases && alias docker-compose='docker compose'; }

# let everything start
sleep 5

# print for debug
docker-compose ps

# test dhcp server
docker-compose cp bootstrap:/opi.pem /tmp/opi.pem
docker-compose cp bootstrap:/tmp/sztpd-simulator/pki/client/end-entity/my_cert.pem /tmp/my_cert.pem
docker-compose cp bootstrap:/tmp/sztpd-simulator/pki/client/end-entity/private_key.pem /tmp/private_key.pem

echo "DONE"
3 changes: 2 additions & 1 deletion sztp-agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ RUN go build -v -o /opi-sztp-agent && CGO_ENABLED=0 go test -v ./...
# second stage to reduce image size
FROM alpine:3.18

RUN apk add --no-cache curl && rm -rf /var/cache/apk/*
RUN apk add --no-cache --no-check-certificate curl && rm -rf /var/cache/apk/*

# hadolint ignore=DL3022
COPY ./*.json /tmp/
# hadolint ignore=DL3022
Expand Down

0 comments on commit 1d1cd6c

Please sign in to comment.