PejmanNik / lazvard-message

lightweight AMQP server - Azure Service Bus simulator
MIT License
65 stars 10 forks source link

Docker image #4

Closed abemedia closed 1 month ago

abemedia commented 1 year ago

Would be great if this was wrapped into a docker image for easy testing in multiple languages.

viachmev commented 7 months ago

+1

alexbezugliy commented 7 months ago

Great idea - who can contribute this and what effort is required?

PejmanNik commented 7 months ago

The main issue is (was) handling certificates and SSL, but now most of the service bus client supports non-secure (HTTP) endpoint with the last release and it should be pretty straightforward now, but it also means MS is finalizing the official version of the service bus simulator and makes me wondering if it worth to spend time on this project 🤔😕

zelda1998 commented 7 months ago

Im trying to create a docker container with this Dockerfile

FROM mcr.microsoft.com/dotnet/sdk:8.0 as build

WORKDIR /source
COPY . .

WORKDIR /source/src/Lazvard.Message.Cli

RUN dotnet restore
RUN dotnet publish --no-restore -o /app
RUN dotnet dev-certs https

RUN mv ~/.dotnet/corefx/cryptography/x509stores/my/*.pfx /app/cert.pfx

FROM mcr.microsoft.com/dotnet/runtime:8.0
WORKDIR /app

RUN apt-get update -y && apt-get install vim -y

COPY --from=build /app .

EXPOSE 5671

When i enter in container and start the CLI Manually, this error appears

Can't load the certificate. please check the certificate or use the built-in certificate manager In order to troubleshoot the built-in certificate manager please use dotnet dev-certs documentation Error: ValidCertificatePresent

config.toml image

PejmanNik commented 4 months ago

Hi, with the latest version 0.3.0, and the latest Azure SDK, you no longer need HTTPS and certificates for the local emulator. As long as you can map the container to localhost, containerization shouldn't have any challenges.

raphaelm22 commented 2 months ago

I created a PR https://github.com/PejmanNik/lazvard-message/pull/9 to help in this insue

PejmanNik commented 1 month ago

Dockerfile (Containerfile) is in the repo now and I also published it in the docker hub pejmann/lazvard-message

Please check the readme in the repo for more info