How to install AppArmor on alpine

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0















I have a container with alpine image (docker:dind) and I want to install ApparMor inside it to see how it works before I put it on the host.



I found ApparMor package in alpine repostiroy but I don't understand how to install it.



How can I install it and start using it?



EDIT:

On Ubuntu I succeeded with:
apt-get update && apt-get install apparmor-utils



But when I tried on alpine with:
apk update && apk add apparmor-utils

It failed:



/ # apk update && apk add apparmor-utils
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
v3.8.2-19-g151c2021d6 [http://dl-cdn.alpinelinux.org/alpine/v3.8/main]
v3.8.2-18-gd7f33f856a [http://dl-cdn.alpinelinux.org/alpine/v3.8/community]
OK: 9546 distinct packages available
ERROR: unsatisfiable constraints:
apparmor-utils (missing):
required by: world[apparmor-utils]









share|improve this question



















  • 1





    Alpine has its own repository, and often names can be a bit different: pkgs.alpinelinux. So looks likeapk add apparmor should do the trick. Side note: looks like this is in the test repository. Most likely you need to add that to /etc/apk/repositories. sudo echo 'http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && sudo apk update && sudo info apparmor

    – rowan
    Jan 11 at 10:22












  • Good practice for test repositories is pinning, check out the documentation here and search for Repository pinning. In this case you won't just upgrade packages that you rather not want from testing. So be aware that I can screw up your installation based on my previous comment where I just echo the repository in without using pinning.

    – rowan
    Jan 11 at 10:29












  • @rowan I am running the alpine inside a container so I don't care if something will happen. I tried your first suggestion and it failed on info apparmor: sh: appramor: not found

    – E235
    Jan 11 at 16:42











  • Did you add the repository? I just tested it, and it worked.

    – rowan
    Jan 11 at 17:25











  • It seems to be installed but the command ` info apparmor` is not working. I noticed I have a new command apparmor_parser. Does it mean that it installed? I thought I need to have a binary named apparmor.

    – E235
    Jan 12 at 16:00















0















I have a container with alpine image (docker:dind) and I want to install ApparMor inside it to see how it works before I put it on the host.



I found ApparMor package in alpine repostiroy but I don't understand how to install it.



How can I install it and start using it?



EDIT:

On Ubuntu I succeeded with:
apt-get update && apt-get install apparmor-utils



But when I tried on alpine with:
apk update && apk add apparmor-utils

It failed:



/ # apk update && apk add apparmor-utils
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
v3.8.2-19-g151c2021d6 [http://dl-cdn.alpinelinux.org/alpine/v3.8/main]
v3.8.2-18-gd7f33f856a [http://dl-cdn.alpinelinux.org/alpine/v3.8/community]
OK: 9546 distinct packages available
ERROR: unsatisfiable constraints:
apparmor-utils (missing):
required by: world[apparmor-utils]









share|improve this question



















  • 1





    Alpine has its own repository, and often names can be a bit different: pkgs.alpinelinux. So looks likeapk add apparmor should do the trick. Side note: looks like this is in the test repository. Most likely you need to add that to /etc/apk/repositories. sudo echo 'http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && sudo apk update && sudo info apparmor

    – rowan
    Jan 11 at 10:22












  • Good practice for test repositories is pinning, check out the documentation here and search for Repository pinning. In this case you won't just upgrade packages that you rather not want from testing. So be aware that I can screw up your installation based on my previous comment where I just echo the repository in without using pinning.

    – rowan
    Jan 11 at 10:29












  • @rowan I am running the alpine inside a container so I don't care if something will happen. I tried your first suggestion and it failed on info apparmor: sh: appramor: not found

    – E235
    Jan 11 at 16:42











  • Did you add the repository? I just tested it, and it worked.

    – rowan
    Jan 11 at 17:25











  • It seems to be installed but the command ` info apparmor` is not working. I noticed I have a new command apparmor_parser. Does it mean that it installed? I thought I need to have a binary named apparmor.

    – E235
    Jan 12 at 16:00













0












0








0








I have a container with alpine image (docker:dind) and I want to install ApparMor inside it to see how it works before I put it on the host.



I found ApparMor package in alpine repostiroy but I don't understand how to install it.



How can I install it and start using it?



EDIT:

On Ubuntu I succeeded with:
apt-get update && apt-get install apparmor-utils



But when I tried on alpine with:
apk update && apk add apparmor-utils

It failed:



/ # apk update && apk add apparmor-utils
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
v3.8.2-19-g151c2021d6 [http://dl-cdn.alpinelinux.org/alpine/v3.8/main]
v3.8.2-18-gd7f33f856a [http://dl-cdn.alpinelinux.org/alpine/v3.8/community]
OK: 9546 distinct packages available
ERROR: unsatisfiable constraints:
apparmor-utils (missing):
required by: world[apparmor-utils]









share|improve this question
















I have a container with alpine image (docker:dind) and I want to install ApparMor inside it to see how it works before I put it on the host.



I found ApparMor package in alpine repostiroy but I don't understand how to install it.



How can I install it and start using it?



EDIT:

On Ubuntu I succeeded with:
apt-get update && apt-get install apparmor-utils



But when I tried on alpine with:
apk update && apk add apparmor-utils

It failed:



/ # apk update && apk add apparmor-utils
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
v3.8.2-19-g151c2021d6 [http://dl-cdn.alpinelinux.org/alpine/v3.8/main]
v3.8.2-18-gd7f33f856a [http://dl-cdn.alpinelinux.org/alpine/v3.8/community]
OK: 9546 distinct packages available
ERROR: unsatisfiable constraints:
apparmor-utils (missing):
required by: world[apparmor-utils]






alpine-linux apparmor






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 11 at 9:12







E235

















asked Jan 11 at 9:00









E235E235

1204




1204







  • 1





    Alpine has its own repository, and often names can be a bit different: pkgs.alpinelinux. So looks likeapk add apparmor should do the trick. Side note: looks like this is in the test repository. Most likely you need to add that to /etc/apk/repositories. sudo echo 'http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && sudo apk update && sudo info apparmor

    – rowan
    Jan 11 at 10:22












  • Good practice for test repositories is pinning, check out the documentation here and search for Repository pinning. In this case you won't just upgrade packages that you rather not want from testing. So be aware that I can screw up your installation based on my previous comment where I just echo the repository in without using pinning.

    – rowan
    Jan 11 at 10:29












  • @rowan I am running the alpine inside a container so I don't care if something will happen. I tried your first suggestion and it failed on info apparmor: sh: appramor: not found

    – E235
    Jan 11 at 16:42











  • Did you add the repository? I just tested it, and it worked.

    – rowan
    Jan 11 at 17:25











  • It seems to be installed but the command ` info apparmor` is not working. I noticed I have a new command apparmor_parser. Does it mean that it installed? I thought I need to have a binary named apparmor.

    – E235
    Jan 12 at 16:00












  • 1





    Alpine has its own repository, and often names can be a bit different: pkgs.alpinelinux. So looks likeapk add apparmor should do the trick. Side note: looks like this is in the test repository. Most likely you need to add that to /etc/apk/repositories. sudo echo 'http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && sudo apk update && sudo info apparmor

    – rowan
    Jan 11 at 10:22












  • Good practice for test repositories is pinning, check out the documentation here and search for Repository pinning. In this case you won't just upgrade packages that you rather not want from testing. So be aware that I can screw up your installation based on my previous comment where I just echo the repository in without using pinning.

    – rowan
    Jan 11 at 10:29












  • @rowan I am running the alpine inside a container so I don't care if something will happen. I tried your first suggestion and it failed on info apparmor: sh: appramor: not found

    – E235
    Jan 11 at 16:42











  • Did you add the repository? I just tested it, and it worked.

    – rowan
    Jan 11 at 17:25











  • It seems to be installed but the command ` info apparmor` is not working. I noticed I have a new command apparmor_parser. Does it mean that it installed? I thought I need to have a binary named apparmor.

    – E235
    Jan 12 at 16:00







1




1





Alpine has its own repository, and often names can be a bit different: pkgs.alpinelinux. So looks likeapk add apparmor should do the trick. Side note: looks like this is in the test repository. Most likely you need to add that to /etc/apk/repositories. sudo echo 'http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && sudo apk update && sudo info apparmor

– rowan
Jan 11 at 10:22






Alpine has its own repository, and often names can be a bit different: pkgs.alpinelinux. So looks likeapk add apparmor should do the trick. Side note: looks like this is in the test repository. Most likely you need to add that to /etc/apk/repositories. sudo echo 'http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && sudo apk update && sudo info apparmor

– rowan
Jan 11 at 10:22














Good practice for test repositories is pinning, check out the documentation here and search for Repository pinning. In this case you won't just upgrade packages that you rather not want from testing. So be aware that I can screw up your installation based on my previous comment where I just echo the repository in without using pinning.

– rowan
Jan 11 at 10:29






Good practice for test repositories is pinning, check out the documentation here and search for Repository pinning. In this case you won't just upgrade packages that you rather not want from testing. So be aware that I can screw up your installation based on my previous comment where I just echo the repository in without using pinning.

– rowan
Jan 11 at 10:29














@rowan I am running the alpine inside a container so I don't care if something will happen. I tried your first suggestion and it failed on info apparmor: sh: appramor: not found

– E235
Jan 11 at 16:42





@rowan I am running the alpine inside a container so I don't care if something will happen. I tried your first suggestion and it failed on info apparmor: sh: appramor: not found

– E235
Jan 11 at 16:42













Did you add the repository? I just tested it, and it worked.

– rowan
Jan 11 at 17:25





Did you add the repository? I just tested it, and it worked.

– rowan
Jan 11 at 17:25













It seems to be installed but the command ` info apparmor` is not working. I noticed I have a new command apparmor_parser. Does it mean that it installed? I thought I need to have a binary named apparmor.

– E235
Jan 12 at 16:00





It seems to be installed but the command ` info apparmor` is not working. I noticed I have a new command apparmor_parser. Does it mean that it installed? I thought I need to have a binary named apparmor.

– E235
Jan 12 at 16:00










1 Answer
1






active

oldest

votes


















0














Thats because the name of the package is apparmor, not apparmor-utils. That "utils" thing at the end of the package name is Ubuntu specific and on Alpine, apparmor-utils is a subpackage.



Try to install the entire apparmor thing with apk update && apk add apparmor.






share|improve this answer























  • I am still getting the same error. I checked it on labs.play-with-docker.com. I started a container docker run -it alpine and then tried what you wrote.

    – E235
    Jan 11 at 10:29










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493896%2fhow-to-install-apparmor-on-alpine%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Thats because the name of the package is apparmor, not apparmor-utils. That "utils" thing at the end of the package name is Ubuntu specific and on Alpine, apparmor-utils is a subpackage.



Try to install the entire apparmor thing with apk update && apk add apparmor.






share|improve this answer























  • I am still getting the same error. I checked it on labs.play-with-docker.com. I started a container docker run -it alpine and then tried what you wrote.

    – E235
    Jan 11 at 10:29















0














Thats because the name of the package is apparmor, not apparmor-utils. That "utils" thing at the end of the package name is Ubuntu specific and on Alpine, apparmor-utils is a subpackage.



Try to install the entire apparmor thing with apk update && apk add apparmor.






share|improve this answer























  • I am still getting the same error. I checked it on labs.play-with-docker.com. I started a container docker run -it alpine and then tried what you wrote.

    – E235
    Jan 11 at 10:29













0












0








0







Thats because the name of the package is apparmor, not apparmor-utils. That "utils" thing at the end of the package name is Ubuntu specific and on Alpine, apparmor-utils is a subpackage.



Try to install the entire apparmor thing with apk update && apk add apparmor.






share|improve this answer













Thats because the name of the package is apparmor, not apparmor-utils. That "utils" thing at the end of the package name is Ubuntu specific and on Alpine, apparmor-utils is a subpackage.



Try to install the entire apparmor thing with apk update && apk add apparmor.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 11 at 10:19









nwildnernwildner

14.2k24176




14.2k24176












  • I am still getting the same error. I checked it on labs.play-with-docker.com. I started a container docker run -it alpine and then tried what you wrote.

    – E235
    Jan 11 at 10:29

















  • I am still getting the same error. I checked it on labs.play-with-docker.com. I started a container docker run -it alpine and then tried what you wrote.

    – E235
    Jan 11 at 10:29
















I am still getting the same error. I checked it on labs.play-with-docker.com. I started a container docker run -it alpine and then tried what you wrote.

– E235
Jan 11 at 10:29





I am still getting the same error. I checked it on labs.play-with-docker.com. I started a container docker run -it alpine and then tried what you wrote.

– E235
Jan 11 at 10:29

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493896%2fhow-to-install-apparmor-on-alpine%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?