Comments (16)
dev proxy is running, as in I can cntrl+c my way out of it. But it does not give any output so it seems like its stuck at startup. If I run the example curl command to call the proxy from inside the container I get a ‘connection refused’ error.
Eventually I’ll want to call the app from outside of the container, in which case I’ll need to expose the port or setup a network. But for now I’d like to just get a basic working version inside a docker container.
Thanks for the quick responses btw!
from dev-proxy.
I can repro your issue on my M2: basically Dev Proxy is stuck starting when ran in Docker on an M2. Let's take it up as a separate issue that we'll investigate. Thanks for bringing it up
from dev-proxy.
Hey @LucDrenth, I found a solution. Check out #639 for more info.
Also, I updated the base image to arm64v8/ubuntu:focal
to avoid the warning about incompatible architecture.
from dev-proxy.
Any updates on this?
from dev-proxy.
Not at the moment. Would you prefer to use Dev Proxy inside a Docker container rather than having it on the host?
from dev-proxy.
Yes that would be ideal for our setup. I tried running it from a docker container myself but I can't get it to work yet. When running devproxy
it starts a process but I'm not getting any output and the proxy is not working.
from dev-proxy.
Got it. Could you please share with us your Dockerfile and some more information about how you've been trying to use Dev Proxy (OS setup, type of app, etc.)?
from dev-proxy.
I'm trying to mock responses from the Microsoft Graph API.
Dockerfile
FROM amd64/ubuntu:focal
WORKDIR /src
RUN apt -y update
RUN apt -y upgrade
RUN apt install -y \
curl \
unzip
COPY install.sh ./
RUN chmod +x ./install.sh
ENTRYPOINT [ "./install.sh" ]
install.sh
#!/bin/bash
/bin/bash -c "$(curl -sL https://aka.ms/devproxy/setup.sh)"
source ~/.bashrc
# Prevents error "Couldn't find a valid ICU package" when running devproxy
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
# TODO: Binary is not available in path for some reason so we need to specify use the binary location
./devproxy/devproxy
from dev-proxy.
Thanks! Is Dev Proxy running (I can see you're launching it at the end but want to double check it's working)? Is the app calling Microsoft Graph in the same Docker container as Dev Proxy or another (or on your host)?
from dev-proxy.
Cool, thanks for all the information. Let me see if I can replicate this and I'll get back to you
from dev-proxy.
It's working for me just fine. Here's what I've done:
- built a new image using the files you shared
- started a container:
docker run --rm -it devproxy
(the process ends with Dev Proxy running) - connected another terminal session to the running container:
docker exec -it e65 bash
(e65
is my conainer's name) - ran:
curl -ikx http://127.0.0.1:8000 https://jsonplaceholder.typicode.com/posts
which is intercepted by Dev Proxy
The default Dev Proxy config file is setup to intercept requests to https://jsonplaceholder.typicode.com/*
. If you want to intercept calls to Microsoft Graph, you can use the Microsoft 365 specific preset, like devproxy --config-file ~appFolder/presets/m365.json
Hope this helps!
from dev-proxy.
This is not working on my machine (macbook M2). I'm trying exactly what you've done, with the only difference being that I add --platform linux/amd64
at the end of the docker run
command. I'm guessing its an issue with me being on a macbook.
I'm curious what the last output of your container is. Mine looks like
Dev Proxy v0.16.1 installed!
To get started, run:
source ~/.bashrc
devproxy -h
from dev-proxy.
Is your install.sh
file ending with ./devproxy/devproxy
as you shared above?
For me, the output ends with Dev Proxy running (information about the IP address and the port it's using).
from dev-proxy.
I've got an M2 MBAir so can try it there too
from dev-proxy.
Yes my install script ends with running devproxy. I’m also not getting any output when running devproxy after manually logging in to the container. The curl to the proxy is not working.
from dev-proxy.
Let me see if I can repro that on my M2
from dev-proxy.
Related Issues (20)
- Extend APIC plugins markdown reports with a summary HOT 1
- Docs: how to create a CRUD API secured with Entra
- Add support for filtering URLs to watch by request header HOT 16
- Update win-x64 build workflow to include installer SHA256 hash
- Docs: Move response object reference to the MockResponsePlugin reference HOT 1
- Enhancement: Update Linux setup script so that you can specify the version to install
- Extend Dev Proxy with LLM
- Bug: proxy writes ANSI escape codes to file
- Update the OpenApiSpecGeneratorPlugin to ignore OPTIONS requests by default
- Update generated OpenAPI specs
- Update OpenApiSpecGeneratorPlugin reference HOT 1
- Extend docs with information about filtering requests by headers HOT 1
- Document ApiCenterMinimalPermissionPlugin HOT 1
- Document using language model with proxy HOT 1
- Document the OpenAIMockResponsePlugin HOT 1
- Verify minimal guidance permissions console output
- How to check if my app uses production-level APIs HOT 1
- How to check if my app is calling APIs with minimal permissions HOT 1
- How to simulate Azure OpenAI HOT 1
- How to simulate OpenAI API HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dev-proxy.