Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow Dockerfile literal in task cfg #86

Open
eckdanny opened this issue Mar 19, 2022 · 2 comments
Open

[Feature Request] Allow Dockerfile literal in task cfg #86

eckdanny opened this issue Mar 19, 2022 · 2 comments

Comments

@eckdanny
Copy link

For simple uses cases like:

- task: build-image
   ...
      inputs:
      - name: my-build-output-from-another-task
        path: .
      params:
      - DOCKERFILE: |
         FROM nginx
         COPY . /usr/share/nginx/html

this is attractive for the same reasons as Dockerfile [with/without] context from stdin.

@eckdanny
Copy link
Author

What is the best workaround in the meantime?

[Guessing]: put another task before the oci-build-task to write a 2-line Dockerfile to outputs, and then add to inputs?

@natto1784
Copy link

natto1784 commented Mar 28, 2022

What is the best workaround in the meantime?

I do this for a project of mine

  - task: push-image
    ...
      inputs:
      - name: bin
      run:
        path: sh
        args:
        - -c
        - |
          cat <<EOF > Dockerfile
          FROM arm64v8/ubuntu
          COPY bin/singh3 /usr/bin/singh3
          CMD ["singh3"]
          EOF
          build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants