Просмотр исходного кода

add docker internal host to stunnel runner

Mike 1 год назад
Родитель
Сommit
2cfdadef3b
3 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      Dockerfile.stunnel
  2. 0 1
      foodgroup/oservice.go
  3. 1 0
      scripts/run_stunnel.sh

+ 1 - 1
Dockerfile.stunnel

@@ -1,7 +1,7 @@
 ###############################################################################
 # Build stage – compile OpenSSL 1.0.2u and stunnel 5.75
 ###############################################################################
-FROM debian:bookworm-slim AS build
+FROM debian:12.11-slim AS build
 
 ARG OPENSSL_VERSION=1.0.2u
 ARG OPENSSL_TAG=OpenSSL_1_0_2u

+ 0 - 1
foodgroup/oservice.go

@@ -226,7 +226,6 @@ func (s OServiceService) SetUserInfoFields(ctx context.Context, sess *state.Sess
 // Set session idle time to the value of bodyIn.IdleTime. Return a user arrival
 // message to all users who have this user on their buddy list.
 func (s OServiceService) IdleNotification(ctx context.Context, sess *state.Session, bodyIn wire.SNAC_0x01_0x11_OServiceIdleNotification) error {
-	fmt.Printf("\n\ngot idle notification!\n\n")
 	if bodyIn.IdleTime == 0 {
 		sess.UnsetIdle()
 	} else {

+ 1 - 0
scripts/run_stunnel.sh

@@ -10,6 +10,7 @@ fi
 PEM_PATH="$1"
 
 docker run --rm -it \
+  --add-host=host.docker.internal:host-gateway \
   -v "$PEM_PATH:/etc/stunnel/certs/server.pem:ro" \
   -v "$(pwd)/config/ssl/stunnel.conf:/etc/stunnel/stunnel.conf:ro" \
   -p 443:443 \