Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce image size #5

Closed
nicoulaj opened this issue Aug 1, 2017 · 9 comments
Closed

Reduce image size #5

nicoulaj opened this issue Aug 1, 2017 · 9 comments

Comments

@nicoulaj
Copy link
Member

nicoulaj commented Aug 1, 2017

The image size is pretty big (310MB). It can be reduced by uninstalling the compile-time only dependencies after build.

@nicoulaj
Copy link
Member Author

nicoulaj commented Aug 2, 2017

Status:

  • Images are now squashed (size is only reduced from 310MB to 290MB on current master) => merged on master
  • the alpine-linux branch moves from Debian to Alpine Linux as the base image. The image size is reduced from 310MB to 15MB with squashing => not merged on master, as zsh test suite does not seem to work well with busybox instead of GNU coreutils (see this build)

nicoulaj added a commit that referenced this issue Aug 2, 2017
nicoulaj added a commit that referenced this issue Aug 3, 2017
nicoulaj added a commit that referenced this issue Aug 3, 2017
nicoulaj added a commit that referenced this issue Aug 3, 2017
nicoulaj added a commit that referenced this issue Aug 3, 2017
nicoulaj added a commit that referenced this issue Aug 3, 2017
@nicoulaj
Copy link
Member Author

nicoulaj commented Aug 3, 2017

Status:

  • On master the image size has been reduced from 310MB to 78MB by removing build dependencies and squashing.
  • the alpine-linux branch moves from Debian to Alpine Linux as the base image. The image size is reduced to 15MB => not merged on master, as zsh test suite does not seem to work well with busybox/musl instead of GNU libc/coreutils (see this build)

@danielshahaf
Copy link
Member

zsh test suite does not seem to work well with busybox/musl instead of GNU libc/coreutils (see this build)

D03 fails because the diff tool on alpine is not POSIX compliant. See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html#tag_20_34_10_03 (output form when invoked with two file operands).

@nicoulaj
Copy link
Member Author

nicoulaj commented Aug 3, 2017

Yes, this one could be fixed easily by installing diffutils.

The remaining failures are:

Test ./V09datetime.ztst failed: bad status 1, expected 0 from:
  [[ $(strftime '%@' 0 2> /dev/null) == (%|)@ || $? != 0 ]]

=> looks like musl's strftime() does not implement some extensions, and the test handles it incorrectly

./A01grammar.ztst: starting.
Test ./A01grammar.ztst failed: bad status 127, expected 0 from:
  (exec -a /bin/SPLATTER /bin/sh -c 'echo $0')
Error output:
SPLATTER: applet not found
Was testing: `exec' with -a option
./A01grammar.ztst: test failed.

=> not sure what happens here

@danielshahaf
Copy link
Member

danielshahaf commented Aug 3, 2017 via email

@nicoulaj
Copy link
Member Author

nicoulaj commented Aug 3, 2017

No, /etc/zshenv does not exist.

@danielshahaf
Copy link
Member

danielshahaf commented Aug 3, 2017 via email

@nicoulaj
Copy link
Member Author

Step 20/27 : RUN python -c 'import os; os.execv("/bin/sh", ["/bin/SPLATTER", "-c", "echo $0"])'
 ---> Running in 256cd4bca283
SPLATTER: applet not found
The command '/bin/sh -c python -c 'import os; os.execv("/bin/sh", ["/bin/SPLATTER", "-c", "echo $0"])'' returned a non-zero code: 127

From a quick look at busybox docs, it seems it refers to core utilities as "applets" (and may be considers /bin as a special path). The exit code 127 might be incorrectly handled by the test.

@nicoulaj
Copy link
Member Author

Image size is down to 25MB thanks to multi-stage build + minideb.

listout added a commit to listout/gentoo that referenced this issue Aug 25, 2022
On musl The tests A03quoting.ztst, B03print.ztst, V09datetime.ztst, and
E02xtrace.ztst were failing. This commit will fix three of these four
tests (A03quoting.ztst, B03print.ztst and E02xtrace.ztst). Unfortunately
I'm unable to find a solution for the V09datetime.ztst. The issue was
briefly brought up here [1].

I'm adding the Closes tag, although this commit only fixes the issue
partially.

[1]: zsh-users/zsh-docker#5 (comment)

Closes: https://bugs.gentoo.org/833981
Signed-off-by: brahmajit das <listout@protonmail.com>
listout added a commit to listout/gentoo that referenced this issue Aug 25, 2022
On musl the tests A03quoting.ztst, B03print.ztst, V09datetime.ztst, and
E02xtrace.ztst were failing. This commit will fix three of these four
tests (A03quoting.ztst, B03print.ztst and E02xtrace.ztst). Unfortunately
I'm unable to find a solution for the V09datetime.ztst. The issue was
briefly brought up here [1].

I'm adding the Closes tag, although this commit only fixes the issue
partially.

[1]: zsh-users/zsh-docker#5 (comment)

Closes: https://bugs.gentoo.org/833981
Signed-off-by: brahmajit das <listout@protonmail.com>
listout added a commit to listout/gentoo that referenced this issue Aug 25, 2022
On musl the tests A03quoting.ztst, B03print.ztst, V09datetime.ztst, and
E02xtrace.ztst were failing. This commit will fix three of these four
tests (A03quoting.ztst, B03print.ztst and E02xtrace.ztst). Unfortunately
I'm unable to find a solution for the V09datetime.ztst. The issue was
briefly brought up here [1].

I'm adding the Closes tag, although this commit only fixes the issue
partially.

[1]: zsh-users/zsh-docker#5 (comment)

Closes: https://bugs.gentoo.org/833981
Signed-off-by: brahmajit das <listout@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants