github-action icon indicating copy to clipboard operation
github-action copied to clipboard

Docker-compose to use the network host but could not resolve tailscale network domain

Open hungran opened this issue 1 year ago • 0 comments

Hi, I've this job auth successfully with my tailscale network on the github runner could interact, solved domain from my machine in tail net..

however, the docker-compose could not resolve the tailscale domain by magic DNS during the docker-compose build is there any missing

jobs:
    image:
        runs-on: ubuntu-latest
        strategy:
            matrix:
                app: [xxx]
        steps:
            - name: Tailscale
              uses: tailscale/github-action@v2
              with:
                oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
                oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
                tags: "tag:k8s"
                version: 1.52.0
            - run: |
                tailscale status
                curl http://xxx.tailxxxx.ts.net:8888
            - run: |
                ... docker-compose build xxx

the dockerfile looks like:

ARG NODE_VERSION=12

###

FROM node:$NODE_VERSION as builder

ARG NEXUS_NPM_TOKEN
ARG NEXUS_CERT_FILE

RUN npm config set //xxxxx.tailxxx.ts.net:8080/repository/npm-playstudios/:_authToken $NEXUS_NPM_TOKEN  \
  && npm config set @psa:registry http://xxxxx.tailxxx.ts.net:8080/repository/npm-playstudios/ 
...
RUN ["npm", "ci"]

log:

 npm ERR! code E400
5.780 npm ERR! 400 Bad Request - GET http:

hungran avatar Jan 18 '24 04:01 hungran