Skip to content

Instantly share code, notes, and snippets.

@juanperi
Created March 9, 2017 08:02
Show Gist options
  • Save juanperi/55f68e44c8aea6269c73d621ecfddfd1 to your computer and use it in GitHub Desktop.
Save juanperi/55f68e44c8aea6269c73d621ecfddfd1 to your computer and use it in GitHub Desktop.
Files to reproduce Ownership error when compiling appsignal
FROM elixir:1.4.1
WORKDIR /app
ADD mix.exs mix.exs
RUN mix local.hex --force
RUN mix local.rebar --force
~/workspace/sandbox/elixir_mix 9:00:59
$ docker build -t test_appsignal .
Sending build context to Docker daemon 15.82 MB
Step 1 : FROM elixir:1.4.1
 ---> 6ab928376b6f
Step 2 : WORKDIR /app
 ---> Using cache
 ---> e6db12438fe2
Step 3 : ADD mix.exs mix.exs
 ---> Using cache
 ---> 6da346a8e286
Step 4 : RUN mix local.hex --force
 ---> Using cache
 ---> 216d9e275096
Step 5 : RUN mix local.rebar --force
 ---> Using cache
 ---> f7c5e8c73d4f
Successfully built f7c5e8c73d4f

~/workspace/sandbox/elixir_mix 9:01:12
$ docker run -it -v `pwd`:/app test_appsignal mix do deps.get, compile appsignal
Running dependency resolution...
All dependencies up to date

08:01:21.219 [info]  Downloading agent release from https://appsignal-agent-releases.global.ssl.fastly.net/557cdf6/appsignal-x86_64-linux-all-static.tar.gz
/bin/tar: ./appsignal-agent: Cannot change ownership to uid 501, gid 50: Operation not permitted
/bin/tar: ./appsignal.h: Cannot change ownership to uid 501, gid 50: Operation not permitted
/bin/tar: ./appsignal.version: Cannot change ownership to uid 501, gid 50: Operation not permitted
/bin/tar: ./libappsignal.a: Cannot change ownership to uid 501, gid 50: Operation not permitted
/bin/tar: .: Cannot change ownership to uid 501, gid 50: Operation not permitted
/bin/tar: Exiting with failure status due to previous errors
==> appsignal
could not compile dependency :appsignal, "mix compile" failed. You can recompile this dependency with "mix deps.compile appsignal", update it with "mix deps.update appsignal" or clean it with "mix deps.clean appsignal"
==> test
** (Mix) Extracting of /tmp/appsignal-agent-557cdf6.tar.gz failed!
defmodule Test.Mixfile do
use Mix.Project
def project do
[app: :test,
version: "0.1.0",
elixir: "~> 1.3",
deps: deps()]
end
def application do
[]
end
defp deps do
[
{:appsignal, "~> 1.0"},
]
end
end
#!/bin/bash
docker build -t text_appsignal .
docker run -it -v `pwd`:/app test_appsignal mix do deps.get, compile appsignal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment