Skip to content

Commit

Permalink
Switching to the debian bookwarm image
Browse files Browse the repository at this point in the history
  • Loading branch information
nvasta committed Jun 7, 2024
1 parent e26af7d commit 8d8309b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docker/Dockerfile.edgerouter
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ COPY ./consumer/ /consumer/
RUN go build -o edgerouter .

# Start a new stage from scratch
FROM alpine:latest
FROM debian:bookworm

# Set the Current Working Directory inside the container
WORKDIR /edgerouter

RUN apk update && apk add -q ca-certificates
RUN apt-get update && apt-get install -y ca-certificate

# Copy the Pre-built binary file from the previous stage
COPY --from=builder /edgerouter/edgerouter .
Expand All @@ -73,4 +73,4 @@ ENV CERT_KEY_PATH=""
ENV CLIENT_CA=""

# Command to run the executable with environment variables as input parameters
CMD ["sh", "-c", "/edgerouter/edgerouter --mrn $MRN --raddr $RADDR --port $PORT --libp2p-port $LIBP2P_PORT --privkey $PRIVKEY --cilent-cert $CLIENT_CERT_PATH --cilent-cert-key $CLIENT_CERT_KEY_PATH --cert-path $CERT_PATH --cert-key-path $CERT_KEY_PATH --client-ca $CLIENT_CA"]
CMD ["sh", "-c", "./edgerouter --mrn $MRN --raddr $RADDR --port $PORT --libp2p-port $LIBP2P_PORT --privkey $PRIVKEY --cilent-cert $CLIENT_CERT_PATH --cilent-cert-key $CLIENT_CERT_KEY_PATH --cert-path $CERT_PATH --cert-key-path $CERT_KEY_PATH --client-ca $CLIENT_CA"]
13 changes: 7 additions & 6 deletions docker/Dockerfile.router
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ COPY ./consumer/ ../consumer/
RUN go build -o router .

# Start a new stage from scratch
FROM alpine:latest
FROM debian:bookworm

# Set the Current Working Directory inside the container
WORKDIR /router
Expand All @@ -57,10 +57,11 @@ EXPOSE 9000
# Set default environment variables
ENV PORT="8080"
ENV LIBP2P_PORT="9000"
ENV PRIVKEY="default_privkey_value"
ENV CERT_PATH="default_cert_path"
ENV CERT_KEY_PATH="default_cert_key_path"
ENV CLIENT_CA="default_client_ca"
ENV PRIVKEY=""
ENV CERT_PATH=""
ENV CERT_KEY_PATH=""
ENV CLIENT_CA=""

# Command to run the executable with environment variables as input parameters
CMD ["sh", "-c", "/router/router --port $PORT --libp2p-port $LIBP2P_PORT --privkey $PRIVKEY --cert-path $CERT_PATH --cert-key-path $CERT_KEY_PATH --client-ca $CLIENT_CA"]
CMD ["sh", "-c", "./router --port $PORT --libp2p-port $LIBP2P_PORT --privkey $PRIVKEY --cert-path $CERT_PATH --cert-key-path $CERT_KEY_PATH --client-ca $CLIENT_CA"]

0 comments on commit 8d8309b

Please sign in to comment.