[X] The documentation does not mention anything about my problem
[X] There are no open or closed issues that are related to my problem
Description
The build and push step seems to ignore some files that were created beforehand.
I have a step that runs an npm run build that creates some js files, but those files do not seem to be in the resulting image.
I've added a debug step that runs an ls to check if the files are created
I use the context: . option
.dockerignore doesn't seem to be the problem
Expected behaviour
That the final docker image contains the newly created files
name: Docker Hub
on:
push:
branches:
- 'master'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: ls dir
run: ls -al static/js/app-dashboard
-
name: Install dependencies
run: npm install
-
name: npm Build
run: npm run build
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: ls dir
run: ls -al static/js/app-dashboard
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: .
tags: peermetrics/web:latest
push: true
- name: Logout from Docker Hub
run: docker logout
Workflow logs
No response
BuildKit logs
No response
Additional info
I've tried multiple other options before opening this issue.
Weirdly enough the node_modules folder created with run: npm install is present in the final image so I'm not sure where the issue is coming from
Contributing guidelines
I've found a bug, and:
Description
The build and push step seems to ignore some files that were created beforehand. I have a step that runs an
npm run build
that creates some js files, but those files do not seem to be in the resulting image.I've added a debug step that runs an
ls
to check if the files are created I use thecontext: .
option.dockerignore
doesn't seem to be the problemExpected behaviour
That the final docker image contains the newly created files
Actual behaviour
Files are missing
Repository URL
https://github.com/peermetrics/web
Workflow run URL
https://github.com/peermetrics/web/actions/runs/8388367909/job/22972403440
YAML workflow
Workflow logs
No response
BuildKit logs
No response
Additional info
I've tried multiple other options before opening this issue. Weirdly enough the
node_modules
folder created withrun: npm install
is present in the final image so I'm not sure where the issue is coming from