Skip to content

Commit 71295a5

Browse files
committed
fix: try to fix marlin enclave image building
1 parent c693f45 commit 71295a5

File tree

8 files changed

+29
-11
lines changed

8 files changed

+29
-11
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ strip = true
1515
opt-level = 's'
1616

1717
[workspace.package]
18-
version = "1.1.2"
18+
version = "1.1.3"
1919
edition = "2021"
2020
repository = "https://github.com/ldclabs/idempotent-proxy"
2121
keywords = ["idempotent", "reverse", "proxy", "icp"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ In a new terminal, run
8080
cd /mnt/my-server
8181
sudo docker exec -it nitro-cli sh
8282
# or docker pull enclave image
83-
docker build -f enclave/arm64.Dockerfile -t enclave_arm64:latest .
84-
nitro-cli build-enclave --docker-uri enclave_arm64:latest --output-file enclave_arm64.eif
83+
docker build -f enclave/amd64.Dockerfile -t enclave_amd64:latest .
84+
nitro-cli build-enclave --docker-uri enclave_amd64:latest --output-file enclave_amd64.eif
8585
```
8686

8787
### Running as Cloudflare Worker

enclave/.env

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
SERVER_ADDR=127.0.0.1:8088
2+
POLL_INTERVAL=100 # in milliseconds
3+
REQUEST_TIMEOUT=20000 # in milliseconds
4+
LOG_LEVEL=warn # debug, info, warn, error
5+
# cert file path to enable https, for example: /etc/https/mydomain.crt
6+
TLS_CERT_FILE = ""
7+
# key file path to enable https, for example: /etc/https/mydomain.key
8+
TLS_KEY_FILE = ""

enclave/amd64.Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ COPY enclave/setup.sh ./
5353
RUN chmod +x setup.sh
5454

5555
# your custom setup goes here
56-
COPY --from=builder /src/.env ./.env
56+
# COPY enclave/.env ./.env
57+
COPY enclave/.env ../.env
5758
COPY --from=builder /src/target/release/idempotent-proxy-server ./idempotent-proxy-server
5859

5960
# entry point

enclave/arm64.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ COPY enclave/setup.sh ./
5353
RUN chmod +x setup.sh
5454

5555
# your custom setup goes here
56-
COPY --from=builder /src/.env ./.env
56+
# COPY enclave/.env ./.env
57+
COPY enclave/.env ../.env
5758
COPY --from=builder /src/target/release/idempotent-proxy-server ./idempotent-proxy-server
5859

5960
# entry point
60-
ENTRYPOINT [ "/app/setup.sh" ]
61+
ENTRYPOINT [ "./idempotent-proxy-server" ]

enclave/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ iptables -L -t nat
2020

2121
# starting supervisord
2222
cat /etc/supervisord.conf
23-
/app/supervisord
23+
/app/supervisord

enclave/supervisord.conf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,19 @@ stdout_logfile_maxbytes=0
3939
stderr_logfile=/dev/stdout
4040
stderr_logfile_maxbytes=0
4141

42+
[program:idempotent-proxy-server-proxy]
43+
command=/app/vsock-to-ip --vsock-addr 88:1200 --ip-addr 127.0.0.1:8088
44+
autorestart=true
45+
stdout_logfile=/dev/stdout
46+
stdout_logfile_maxbytes=0
47+
stderr_logfile=/dev/stdout
48+
stderr_logfile_maxbytes=0
49+
4250
# your custom programs go here
4351
[program:idempotent-proxy-server]
4452
command=/app/idempotent-proxy-server
4553
autorestart=true
4654
stdout_logfile=/dev/stdout
4755
stdout_logfile_maxbytes=0
4856
stderr_logfile=/dev/stdout
49-
stderr_logfile_maxbytes=0
57+
stderr_logfile_maxbytes=0

0 commit comments

Comments
 (0)