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

Podman API doesn't accept "application/tar" content-type for "docker-compose build" #7185

Closed
orenbm opened this issue Aug 2, 2020 · 0 comments · Fixed by #7205
Closed

Podman API doesn't accept "application/tar" content-type for "docker-compose build" #7185

orenbm opened this issue Aug 2, 2020 · 0 comments · Fixed by #7205
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@orenbm
Copy link

orenbm commented Aug 2, 2020

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Running docker-compose build <service-name> where the service is built from a Dockerfile doesn't work, and yields a Failed to parse query parameter 'Content-Type': "application/tar": Content-Type: application/tar is not supported. Should be "application/x-tar" error.

Note: there is another issue where the network is not created successfully so as a workaround I ran docker-compose network create test_default before running the commands below.

Steps to reproduce the issue:

  1. Start podman service with podman system service -t 0 tcp:0.0.0.0:8080 &

  2. Run export DOCKER_HOST=localhost:8080 so that docker-compose will talk with the Podman API service.

  3. Create Dockerfile, for example:

FROM ruby:2.5
  1. Create docker-compose.yml:
version: '2.1'
services:
  service-name:
    build:
      context: .
  1. Run docker-compose build service-name

Describe the results you received:

Building service-name
ERROR: Failed to parse query parameter 'Content-Type': "application/tar": Content-Type: application/tar is not supported. Should be "application/x-tar"

Describe the results you expected:

Image is built successfully:

Building service-name
Step 1/1 : FROM ruby:2.5
 ---> 5ce41def636c
Successfully built 5ce41def636c
Successfully tagged test_service-name:latest

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

podman version 2.0.4

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.15.0
  cgroupVersion: v1
  conmon:
    package: conmon-2.0.20-1.el8.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.20, commit: ee5acee39338dff8d32a921a46909359315197b6'
  cpus: 2
  distribution:
    distribution: '"rhel"'
    version: "8.2"
  eventLogger: file
  hostname: ip-172-31-13-47.eu-central-1.compute.internal
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 4.18.0-193.el8.x86_64
  linkmode: dynamic
  memFree: 303247360
  memTotal: 3959033856
  ociRuntime:
    name: runc
    package: runc-1.0.0-145.rc91.git24a3cf8.el8.x86_64
    path: /usr/bin/runc
    version: 'runc version spec: 1.0.2-dev'
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 0
  swapTotal: 0
  uptime: 89h 52m 11.99s (Approximately 3.71 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageStore:
    number: 1
  runRoot: /var/run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 1
  Built: 0
  BuiltTime: Thu Jan  1 00:00:00 1970
  GitCommit: ""
  GoVersion: go1.13.4
  OsArch: linux/amd64
  Version: 2.0.4

Package info (e.g. output of rpm -q podman or apt list podman):

podman-2.0.4-1.el8.x86_64

Additional environment details (AWS, VirtualBox, physical, etc.):

  • Running on RHEL 8.2
  • Downloaded podman using CentOS 8 instructions from the installation guide (as RHEL doesn't have Podman 2.0 yet in its repos)
  • Ran export DOCKER_HOST=localhost:8080 so that docker-compose will talk with the Podman API service.
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 2, 2020
@orenbm orenbm changed the title Podman API doesn't accepts "application/tar" content-type for "docker-compose build" Podman API doesn't accept "application/tar" content-type for "docker-compose build" Aug 2, 2020
baude added a commit to baude/podman that referenced this issue Aug 3, 2020
even though the official documentation suggests that application/x-tar should be used for tar files, it seems docker-compose uses application/tar.  we now accept them and issue a warning.

Fixes: containers#7185

Signed-off-by: Brent Baude <[email protected]>
vrothberg pushed a commit to vrothberg/libpod that referenced this issue Aug 11, 2020
even though the official documentation suggests that application/x-tar should be used for tar files, it seems docker-compose uses application/tar.  we now accept them and issue a warning.

Fixes: containers#7185

Signed-off-by: Brent Baude <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
2 participants