Closed invidian closed 5 years ago
Interesting. Looks like some relevant discussions are here:
Added to the release! https://github.com/phillbaker/terraform-provider-mailgunv3/releases/tag/v0.3.1
Cool, thanks!
I'm not sure if this is actual issue but using release binary without platform defined, I get this funny result on Alpine Linux. Locally on Arch Linux, everything works fine though.
/ # export TERRAFORM_PROVIDER_MAILGUNV3_VERSION=0.3.1
/ # wget https://github.com/phillbaker/terraform-provider-mailgunv3/releases/download/v${TERRAFORM_PROVIDER_MAILGUNV3_VERSION}/terraform-provider-mailgunv3_v${TERRAFORM_PROVIDER_MAILGUNV3_VERSION} -O .terraform/plugins/linux_amd64/terrafor
m-provider-mailgunv3_v${TERRAFORM_PROVIDER_MAILGUNV3_VERSION}_x4
Connecting to github.com (140.82.118.4:443)
wget: server returned error: HTTP/1.1 404 Not Found
/ # export TERRAFORM_PROVIDER_MAILGUNV3_VERSION=0.3.1
/ # wget https://github.com/phillbaker/terraform-provider-mailgunv3/releases/download/v${TERRAFORM_PROVIDER_MAILGUNV3_VERSION}/terraform-provider-mailgunv3 -O .terraform/plugins/linux_amd64/terraform-provider-mailgunv3_v${TERRAFORM_PROVIDE
R_MAILGUNV3_VERSION}_x4
Connecting to github.com (140.82.118.4:443)
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (52.217.0.204:443)
terraform-provider-m 100% |***********************************************************************************************************************************************************************************************| 32.0M 0:00:00 ETA
/ # chmod +x .terraform/plugins/linux_amd64/terraform-provider-mailgunv3_v${TERRAFORM_PROVIDER_MAILGUNV3_VERSION}_x4
/ # stat .terraform/plugins/linux_amd64/terraform-provider-mailgunv3_v0.3.1_x4
File: .terraform/plugins/linux_amd64/terraform-provider-mailgunv3_v0.3.1_x4
Size: 33631504 Blocks: 65688 IO Block: 4096 regular file
Device: 32h/50d Inode: 21903431 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-06-14 13:20:28.000000000
Modify: 2019-06-14 13:25:51.000000000
Change: 2019-06-14 13:26:29.000000000
/ # .terraform/plugins/linux_amd64/terraform-provider-mailgunv3_v0.3.1_x4
sh: .terraform/plugins/linux_amd64/terraform-provider-mailgunv3_v0.3.1_x4: not found
/ # strace .terraform/plugins/linux_amd64/terraform-provider-mailgunv3_v0.3.1_x4
execve(".terraform/plugins/linux_amd64/terraform-provider-mailgunv3_v0.3.1_x4", [".terraform/plugins/linux_amd64/t"...], 0x7ffedaedce20 /* 8 vars */) = -1 ENOENT (No such file or directory)
writev(2, [{iov_base="strace: exec: No such file or di"..., iov_len=40}, {iov_base=NULL, iov_len=0}], 2strace: exec: No such file or directory
) = 40
getpid() = 47
exit_group(1) = ?
+++ exited with 1 +++
/ # which exec
/ # which ls
/bin/ls
/ # man exec
sh: man: not found
/ # bash
bash-4.4# .terraform/plugins/linux_amd64/terraform-provider-mailgunv3_v0.3.1_x4
bash: .terraform/plugins/linux_amd64/terraform-provider-mailgunv3_v0.3.1_x4: No such file or directory
bash-4.4# strace .terraform/plugins/linux_amd64/terraform-provider-mailgunv3_v0.3.1_x4
execve(".terraform/plugins/linux_amd64/terraform-provider-mailgunv3_v0.3.1_x4", [".terraform/plugins/linux_amd64/t"...], 0x7ffdeba98d50 /* 9 vars */) = -1 ENOENT (No such file or directory)
writev(2, [{iov_base="strace: exec: No such file or di"..., iov_len=40}, {iov_base=NULL, iov_len=0}], 2strace: exec: No such file or directory
) = 40
getpid() = 54
exit_group(1) = ?
+++ exited with 1 +++
@invidian are you using the static builds?
In this case no. I did more testing and indeed installing libc in this case fixes the problem. With static builds everything is fine, so all good!
Which makes it problematic to run in alpine environment.
As a workaround, this can be executed in alpine
apk install libc6-compat
.IIRC the binary should be built with
CGO_ENABLED=0
env variable.