aditya Damera
aditya Damera

Reputation: 155

Not able to Run my Application in Azure container Apps

I have node docker application which is running on Azure app service but the same application is not working on Azure container apps. I'm not able to find the issue.please let me know what i'm missing here.

This is my Docker file

FROM node:alpine

# Need for privileged ports
RUN apk add --no-cache libcap

ARG DEVENV=dev

WORKDIR /var/app/UserService
COPY . .
COPY .env .env

RUN ls -la

RUN npm install
RUN npm install typescript -g
#RUN #apt-get install make
RUN apk add --no-cache make

RUN setcap 'cap_net_bind_service=+ep' /usr/local/bin/node
# Create user for App and give permissions to /app and /tmp folders
RUN addgroup -S appgroup && adduser -S appuser -G appgroup && chown -R appuser /app /tmp
USER appuser

EXPOSE 8000

CMD ["make", "run-migration","run"]

And In container apps iam getting this below error



SourceSystem
RestAPI

TimeGenerated [UTC]
2022-04-04T06:35:46.842Z

_timestamp_d
1649054145.56059

msg_s
error connecting to tcp address

ContainerId_s
e69406ad779ed5024cf28a8ad10970579f5c630b9beaeb7e614831f7aceef615

Level
error

Kind_s
apps

ContainerImage_s
mcr.microsoft.com/k8se/probe-shim:priv-cf9c374-m

logtag_s
F

stacktrace_s
main.handleProbe
    /__w/k4apps/k4apps/cmd/probeshim/main.go:60
main.main.func1
    /__w/k4apps/k4apps/cmd/probeshim/main.go:89
net/http.HandlerFunc.ServeHTTP
    /usr/local/go/src/net/http/server.go:2046
net/http.serverHandler.ServeHTTP
    /usr/local/go/src/net/http/server.go:2878
net/http.(*conn).serve
    /usr/local/go/src/net/http/server.go:1929

error_s
dial tcp [::1]:8000: connect: connection refused

caller_s
probeshim/main.go:60

ts_d
1649054145.5604

ContainerName_s
probe-shim-0cee4339

Stream_s
stderr

EnvironmentName_s
icyforest-2ff5885d

Type
ContainerAppConsoleLogs_CL

i have exposed 8000 port still getting this error.

Upvotes: 0

Views: 1554

Answers (1)

AjayKumarGhose
AjayKumarGhose

Reputation: 4923

Based on the MICROSOFT DOCUMENTATION:-


Azure Container Apps can't run privileged containers. If your program attempts to run a process that requires root access, the application inside the container experiences a runtime error.


For more information please refer this MS DOC| Azure Container Apps Preview overview

Upvotes: 0

Related Questions