Hacker News new | ask | show | jobs
by IshKebab 651 days ago
It's almost a perfect drop-in replacement for Docker so I don't see why it would be any less "set-and-forget".

I only ever found one thing that didn't work with it at all - I think it was Gitlab's test docker images because they set up some VMs with Vagrant or something. Pretty niche anyway.

3 comments

The one edge case I know of (and have run into) is that podman push doesn't support the --all-tags flag. They have also said they do not plan to implement it. It's annoying because that flag is useful for CI scripts (we give multiple tags to the same build), but not the end of the world either.
I could not get LocalStack to work on Podman, to my chagrin. And no, doing the "sudo touch /etc/containers/nodocker" thing didn't solve it.

  podman version
  podman pull public.ecr.aws/localstack/localstack:4.1
  podman run --detach --name lstack -p 4566:4566 public.ecr.aws/localstack/localstack:4.1
  # sorry, I don't have awscli handy
  export AWS_DEFAULT_REGION=us-east-1 AWS_ACCESS_KEY_ID=alpha AWS_SECRET_ACCESS_KEY=beta
  $HOMEBREW_PREFIX/opt/ansible/libexec/bin/python -c '
    import boto3
    sts = boto3.client("sts", endpoint_url="http://localhost:4566")
    print(sts.get_caller_identity())
    '
  {'UserId': 'AKIAIOSFODNN7EXAMPLE', 'Account': '000000000000', 'Arn': 'arn:aws:iam::000000000000:root', ...

I'll spare you the verbosity but

  2025-02-22T18:51:56.427  INFO --- [et.reactor-0] localstack.request.aws     : AWS s3.CreateBucket => 200
  2025-02-22T18:52:14.332  INFO --- [et.reactor-0] localstack.request.aws     : AWS s3.PutObject => 200

  cat > sample-stack.yaml <<'YAML'
  AWSTemplateFormatVersion: 2010-09-09
  Resources:
    Iam0:
      Type: AWS::IAM::Role
      Properties:
        RoleName: Iam0
        ManagedPolicyArns:
        - arn:aws:iam::aws:policy/AdministratorAccess
        AssumeRolePolicyDocument:
          Principal:
            AWS:
              Ref: AWS::AccountId
          Effect: Allow
          Action: sts:AssumeRole
  YAML
  create_stack_command_goes_here
  2025-02-22T18:55:02.657  INFO --- [et.reactor-0] localstack.request.aws     : AWS cloudformation.CreateStack => 200
---

ed: ah, I bet you mean the lambda support; FWIW they do call out explicit support for Podman[1] but in my specific setup I had to switch it to use -e DOCKER_HOST=tcp://${my_vm_ip}:2375 and then $(podman system service tcp://0.0.0.0:2375) in the lima vm due to the podman.sock being chown to my macOS UID. My life experience is that engineering is filled with this kind of shit

I used https://github.com/aws-samples/aws-cloudformation-inline-pyt... to end-to-end test it

1: https://github.com/localstack/localstack/blob/v4.1.1/localst...

In fact, there is even a package "podman-docker" that will alias podman to docker so most of your commands will usually work without modification. (of course, there are always the edge cases)