lazvard-message icon indicating copy to clipboard operation
lazvard-message copied to clipboard

Docker image

Open abemedia opened this issue 2 years ago • 5 comments

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

abemedia avatar Aug 20 '23 14:08 abemedia

+1

viachmev avatar Apr 25 '24 10:04 viachmev

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

alexbezugliy avatar Apr 25 '24 10:04 alexbezugliy

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 🤔😕

PejmanNik avatar Apr 25 '24 10:04 PejmanNik

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

zelda1998 avatar Apr 29 '24 13:04 zelda1998

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.

PejmanNik avatar Jul 13 '24 11:07 PejmanNik

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

raphaelm22 avatar Sep 25 '24 19:09 raphaelm22

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

PejmanNik avatar Sep 28 '24 15:09 PejmanNik