Getting apt-get on an alpine container
I have to install a few dependencies on my docker container, I want to use python:3.6-alpine version to have it as light as possible, but apk package manager which comes with alpine is giving me trouble so I would like to get the apt-get package manager. I tried:
apk add apt-get
and it didnt work.
how can I get it on the container?
docker apt-get apt alpine
add a comment |
I have to install a few dependencies on my docker container, I want to use python:3.6-alpine version to have it as light as possible, but apk package manager which comes with alpine is giving me trouble so I would like to get the apt-get package manager. I tried:
apk add apt-get
and it didnt work.
how can I get it on the container?
docker apt-get apt alpine
apk
is the default package manager on alpine. You don't needapt
– lependu
Nov 20 '18 at 9:22
1
What do you want to install that is giving you trouble with apk?
– Julio Daniel Reyes
Nov 20 '18 at 17:41
add a comment |
I have to install a few dependencies on my docker container, I want to use python:3.6-alpine version to have it as light as possible, but apk package manager which comes with alpine is giving me trouble so I would like to get the apt-get package manager. I tried:
apk add apt-get
and it didnt work.
how can I get it on the container?
docker apt-get apt alpine
I have to install a few dependencies on my docker container, I want to use python:3.6-alpine version to have it as light as possible, but apk package manager which comes with alpine is giving me trouble so I would like to get the apt-get package manager. I tried:
apk add apt-get
and it didnt work.
how can I get it on the container?
docker apt-get apt alpine
docker apt-get apt alpine
asked Nov 20 '18 at 9:19
NotSoShabby
209212
209212
apk
is the default package manager on alpine. You don't needapt
– lependu
Nov 20 '18 at 9:22
1
What do you want to install that is giving you trouble with apk?
– Julio Daniel Reyes
Nov 20 '18 at 17:41
add a comment |
apk
is the default package manager on alpine. You don't needapt
– lependu
Nov 20 '18 at 9:22
1
What do you want to install that is giving you trouble with apk?
– Julio Daniel Reyes
Nov 20 '18 at 17:41
apk
is the default package manager on alpine. You don't need apt
– lependu
Nov 20 '18 at 9:22
apk
is the default package manager on alpine. You don't need apt
– lependu
Nov 20 '18 at 9:22
1
1
What do you want to install that is giving you trouble with apk?
– Julio Daniel Reyes
Nov 20 '18 at 17:41
What do you want to install that is giving you trouble with apk?
– Julio Daniel Reyes
Nov 20 '18 at 17:41
add a comment |
1 Answer
1
active
oldest
votes
Using multiple package systems is usually a very bad idea, for many reasons. Packages are likely to collide and break and you'll end up with much greater mess than you've started with.
See this excellent answer for more detail: Is there a pitfall of using multiple package managers?
A more feasible approach would be troubleshooting and resolving the issues you are having with apk
. apk
is designed for simplicity and speed, and should take very little getting used to. It is really an excellent package manager, IMO.
For a good tutorial, I warmly recommend the apk
introduction page at the Alpine Wiki site:
https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management
If you're determined not to use apk
, and for the sake of experiment want try bringing up apt
instead, as a first step, you'll have first to build apt
from source: https://github.com/Debian/apt. Then, if it is produces a functional build (not likely since it's probably not compatible with musl libc), you'll have to wire it to some repositories, but Alpine repositories are only fit for apk
, not apt
. As you can see, this is not really feasible, and not the route you want to go to.
That's fair, but that got me thinking - why is that any different than using pip as well as other package manage (pip is the python package manager) which everybody do?
– NotSoShabby
Nov 21 '18 at 8:10
1
Python has its own package system, which is managed bypip
, as opposed toapk
andapt
which manage the Linux system binaries and programs.pip
effect is limited to scope of Python programs. Think of it this way - if things break inpip
, Python may break, but if things go wrong inapk
orapt
, your entire Linux system may break.
– valiano
Nov 21 '18 at 8:36
1
@NotSoShabby or put in other words,pip
is orthogonal toapk
/apt
- they are independent of each other.
– valiano
Nov 21 '18 at 10:28
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53389749%2fgetting-apt-get-on-an-alpine-container%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
Using multiple package systems is usually a very bad idea, for many reasons. Packages are likely to collide and break and you'll end up with much greater mess than you've started with.
See this excellent answer for more detail: Is there a pitfall of using multiple package managers?
A more feasible approach would be troubleshooting and resolving the issues you are having with apk
. apk
is designed for simplicity and speed, and should take very little getting used to. It is really an excellent package manager, IMO.
For a good tutorial, I warmly recommend the apk
introduction page at the Alpine Wiki site:
https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management
If you're determined not to use apk
, and for the sake of experiment want try bringing up apt
instead, as a first step, you'll have first to build apt
from source: https://github.com/Debian/apt. Then, if it is produces a functional build (not likely since it's probably not compatible with musl libc), you'll have to wire it to some repositories, but Alpine repositories are only fit for apk
, not apt
. As you can see, this is not really feasible, and not the route you want to go to.
That's fair, but that got me thinking - why is that any different than using pip as well as other package manage (pip is the python package manager) which everybody do?
– NotSoShabby
Nov 21 '18 at 8:10
1
Python has its own package system, which is managed bypip
, as opposed toapk
andapt
which manage the Linux system binaries and programs.pip
effect is limited to scope of Python programs. Think of it this way - if things break inpip
, Python may break, but if things go wrong inapk
orapt
, your entire Linux system may break.
– valiano
Nov 21 '18 at 8:36
1
@NotSoShabby or put in other words,pip
is orthogonal toapk
/apt
- they are independent of each other.
– valiano
Nov 21 '18 at 10:28
add a comment |
Using multiple package systems is usually a very bad idea, for many reasons. Packages are likely to collide and break and you'll end up with much greater mess than you've started with.
See this excellent answer for more detail: Is there a pitfall of using multiple package managers?
A more feasible approach would be troubleshooting and resolving the issues you are having with apk
. apk
is designed for simplicity and speed, and should take very little getting used to. It is really an excellent package manager, IMO.
For a good tutorial, I warmly recommend the apk
introduction page at the Alpine Wiki site:
https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management
If you're determined not to use apk
, and for the sake of experiment want try bringing up apt
instead, as a first step, you'll have first to build apt
from source: https://github.com/Debian/apt. Then, if it is produces a functional build (not likely since it's probably not compatible with musl libc), you'll have to wire it to some repositories, but Alpine repositories are only fit for apk
, not apt
. As you can see, this is not really feasible, and not the route you want to go to.
That's fair, but that got me thinking - why is that any different than using pip as well as other package manage (pip is the python package manager) which everybody do?
– NotSoShabby
Nov 21 '18 at 8:10
1
Python has its own package system, which is managed bypip
, as opposed toapk
andapt
which manage the Linux system binaries and programs.pip
effect is limited to scope of Python programs. Think of it this way - if things break inpip
, Python may break, but if things go wrong inapk
orapt
, your entire Linux system may break.
– valiano
Nov 21 '18 at 8:36
1
@NotSoShabby or put in other words,pip
is orthogonal toapk
/apt
- they are independent of each other.
– valiano
Nov 21 '18 at 10:28
add a comment |
Using multiple package systems is usually a very bad idea, for many reasons. Packages are likely to collide and break and you'll end up with much greater mess than you've started with.
See this excellent answer for more detail: Is there a pitfall of using multiple package managers?
A more feasible approach would be troubleshooting and resolving the issues you are having with apk
. apk
is designed for simplicity and speed, and should take very little getting used to. It is really an excellent package manager, IMO.
For a good tutorial, I warmly recommend the apk
introduction page at the Alpine Wiki site:
https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management
If you're determined not to use apk
, and for the sake of experiment want try bringing up apt
instead, as a first step, you'll have first to build apt
from source: https://github.com/Debian/apt. Then, if it is produces a functional build (not likely since it's probably not compatible with musl libc), you'll have to wire it to some repositories, but Alpine repositories are only fit for apk
, not apt
. As you can see, this is not really feasible, and not the route you want to go to.
Using multiple package systems is usually a very bad idea, for many reasons. Packages are likely to collide and break and you'll end up with much greater mess than you've started with.
See this excellent answer for more detail: Is there a pitfall of using multiple package managers?
A more feasible approach would be troubleshooting and resolving the issues you are having with apk
. apk
is designed for simplicity and speed, and should take very little getting used to. It is really an excellent package manager, IMO.
For a good tutorial, I warmly recommend the apk
introduction page at the Alpine Wiki site:
https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management
If you're determined not to use apk
, and for the sake of experiment want try bringing up apt
instead, as a first step, you'll have first to build apt
from source: https://github.com/Debian/apt. Then, if it is produces a functional build (not likely since it's probably not compatible with musl libc), you'll have to wire it to some repositories, but Alpine repositories are only fit for apk
, not apt
. As you can see, this is not really feasible, and not the route you want to go to.
answered Nov 20 '18 at 19:29
valiano
3,17221333
3,17221333
That's fair, but that got me thinking - why is that any different than using pip as well as other package manage (pip is the python package manager) which everybody do?
– NotSoShabby
Nov 21 '18 at 8:10
1
Python has its own package system, which is managed bypip
, as opposed toapk
andapt
which manage the Linux system binaries and programs.pip
effect is limited to scope of Python programs. Think of it this way - if things break inpip
, Python may break, but if things go wrong inapk
orapt
, your entire Linux system may break.
– valiano
Nov 21 '18 at 8:36
1
@NotSoShabby or put in other words,pip
is orthogonal toapk
/apt
- they are independent of each other.
– valiano
Nov 21 '18 at 10:28
add a comment |
That's fair, but that got me thinking - why is that any different than using pip as well as other package manage (pip is the python package manager) which everybody do?
– NotSoShabby
Nov 21 '18 at 8:10
1
Python has its own package system, which is managed bypip
, as opposed toapk
andapt
which manage the Linux system binaries and programs.pip
effect is limited to scope of Python programs. Think of it this way - if things break inpip
, Python may break, but if things go wrong inapk
orapt
, your entire Linux system may break.
– valiano
Nov 21 '18 at 8:36
1
@NotSoShabby or put in other words,pip
is orthogonal toapk
/apt
- they are independent of each other.
– valiano
Nov 21 '18 at 10:28
That's fair, but that got me thinking - why is that any different than using pip as well as other package manage (pip is the python package manager) which everybody do?
– NotSoShabby
Nov 21 '18 at 8:10
That's fair, but that got me thinking - why is that any different than using pip as well as other package manage (pip is the python package manager) which everybody do?
– NotSoShabby
Nov 21 '18 at 8:10
1
1
Python has its own package system, which is managed by
pip
, as opposed to apk
and apt
which manage the Linux system binaries and programs. pip
effect is limited to scope of Python programs. Think of it this way - if things break in pip
, Python may break, but if things go wrong in apk
or apt
, your entire Linux system may break.– valiano
Nov 21 '18 at 8:36
Python has its own package system, which is managed by
pip
, as opposed to apk
and apt
which manage the Linux system binaries and programs. pip
effect is limited to scope of Python programs. Think of it this way - if things break in pip
, Python may break, but if things go wrong in apk
or apt
, your entire Linux system may break.– valiano
Nov 21 '18 at 8:36
1
1
@NotSoShabby or put in other words,
pip
is orthogonal to apk
/ apt
- they are independent of each other.– valiano
Nov 21 '18 at 10:28
@NotSoShabby or put in other words,
pip
is orthogonal to apk
/ apt
- they are independent of each other.– valiano
Nov 21 '18 at 10:28
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53389749%2fgetting-apt-get-on-an-alpine-container%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
apk
is the default package manager on alpine. You don't needapt
– lependu
Nov 20 '18 at 9:22
1
What do you want to install that is giving you trouble with apk?
– Julio Daniel Reyes
Nov 20 '18 at 17:41