我正在为我的asp.net core应用程序添加一个dockerfile,它位于子目录中。我正在尝试创建一个Github Action来运行dockerfile,但是该操作无法找到它。
我的文件夹结构如下:
当操作运行时,我在Docker构建过程中遇到以下错误。
任何帮助将不胜感激!
api/
|--Data/
|--Service/
|--|--Dockerfile
|--Tests/
|--MyProject.sln
frontend/
My action.yml is:
name: Docker Image CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build ./api/Service/ --file Dockerfile --tag my-image-name:$(date +%s)
当操作运行时,我在Docker构建过程中遇到以下错误。
Run docker build ./api/Service/ --file Dockerfile --tag my-image-name:$(date +%s)
docker build ./api/Service/ --file Dockerfile --tag my-image-name:$(date +%s)
shell: /bin/bash -e {0}
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/runner/work/MyProject-actions/MyProject-actions/Dockerfile: no such file or directory
##[error]Process completed with exit code 1.
任何帮助将不胜感激!