Skip to content

Add lua support. - #38

Merged
yosifkit merged 2 commits into
docker-library:masterfrom
Tecnativa:lua
Jan 19, 2017
Merged

Add lua support.#38
yosifkit merged 2 commits into
docker-library:masterfrom
Tecnativa:lua

Conversation

@yajo

@yajoyajo commented Jan 13, 2017

Copy link
Copy Markdown
Contributor

Following #28 (comment), there you have Lua support for 1.6+.

It must be Lua >= 5.3, so I cannot use system packages for now. Debian and Alpine have older packaged versions.

@Tecnativa

@yosifkit

Copy link
Copy Markdown
Member

Very nice work. Looks like we can get Lua 5.3 from jessie-backports, so we can just swap the Debian Dockerfiles to be from debian:jessie-backports and grab liblua5.3-dev in the buildDeps and lua5.3 in the first apt line at the top.

@yajo

yajo commented Jan 16, 2017

Copy link
Copy Markdown
ContributorAuthor

Cool, done

@lasleylasley left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@JayH5

Copy link
Copy Markdown
Contributor

On Debian you'll need LUA_INC=/usr/include/lua5.3/ added to the make command to get it to link. You'll probably also want liblua5.3-0 as the runtime dependency to get the Lua libraries, not the lua5.3 package which is just the (statically-linked?) Lua interpreter.

@tianon

Copy link
Copy Markdown
Member

Yeah, there are a few other minor changes that need to be made too (whitespace, cleanup), which I've got locally in progress. 👍

Thanks @yajo!

@tianon

Copy link
Copy Markdown
Member

... and of course, today http://www.haproxy.org decides that it should refuse our connections 😢

@tianon

Copy link
Copy Markdown
Member

Seems to be the same issue as in https://www.mail-archive.com/haproxy@formilux.org/msg24512.html

@ryansch

Copy link
Copy Markdown

@tianon Appears to be working now.

@tianon

Copy link
Copy Markdown
Member

Rough size comparisons, for reference:

  • 1.7-alpine: from ~13.8MB to ~14.6MB
  • 1.7: from ~138MB to ~134.9MB (yes, legitimately smaller image with Lua included -- I did a --no-cache build twice on both before and after to make sure I wasn't seeing things)
  • 1.6-alpine: from ~12.91MB to ~13.62MB
  • 1.6: from ~137MB to ~133.8MB (yep, smaller here too)

Comment thread1.6/Dockerfile
&& tar -xzf haproxy.tar.gz -C /usr/src/haproxy --strip-components=1 \
&& rm haproxy.tar.gz \
&& make -C /usr/src/haproxy \
\

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why this (I have seen it below too a few times). Is it for adding a white line? Did you know Dockerfile's white/comment lines are ignored?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we like to have some whitespace to separate sections of the RUN line. The Dockerfile parser does currently ignore empty lines, but it was "fixed" to not do so in moby/moby#24725 and reverted because of moby/moby#29005 in moby/moby#29064, but still planned to be deprecated with moby/moby#29161. As far as I know, comments in RUN lines will stay even if empty lines get removed.

@yosifkit

Copy link
Copy Markdown
Member

I see why it got smaller! You switched to wget and it doesn't leave behind stuff after the apt-get purge -y --auto-remove like curl does. 🎉

@yosifkit
yosifkit merged commit 91cc574 into docker-library:masterJan 19, 2017
tianon added a commit to infosiftr/stackbrew that referenced this pull request Jan 20, 2017
- `bash`: 4.4.7
- `golang`: 1.8rc2
- `haproxy`: add Lua support (docker-library/haproxy#38)
- `postgres`: (mostly) arbitrary `--user` support (docker-library/postgres#253)
- `python`: 3.4.6
@yajo
yajo deleted the lua branch January 20, 2017 08:21
This was referenced Apr 25, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@yajo@yosifkit@JayH5@tianon@ryansch@lasley