Permalink
Browse files

Back to Debian (minideb) from Alpine Linux

  • Loading branch information...
dahlia committed Mar 22, 2018
1 parent 8985577 commit 54ebfef704b839260d3b3efea696ab26bb368dfb
Showing with 25 additions and 13 deletions.
  1. +1 −1 .hadolint.yaml
  2. +7 −0 CHANGES.md
  3. +17 −12 Dockerfile
@@ -1,2 +1,2 @@
ignored:
- DL3018
- DL3008
@@ -48,13 +48,20 @@ To be released.
Under the hood, all generated `import`s are now aliased with a name prefixed
an underscore.
### Et cetera
- The official Docker images became based on Debian ([minideb]) instead of
Alpine Linux. It's because Alpine Linux doesn't provide GHC 8.2 as of
March 2018.
[#13]: https://github.com/spoqa/nirum/issues/13
[#220]: https://github.com/spoqa/nirum/issues/220
[#227]: https://github.com/spoqa/nirum/pull/227
[entry points]: https://setuptools.readthedocs.io/en/latest/pkg_resources.html#entry-points
[python2-numbers-integral]: https://docs.python.org/2/library/numbers.html#numbers.Integral
[python2-basestring]: https://docs.python.org/2/library/functions.html#basestring
[python2-unicode]: https://docs.python.org/2/library/functions.html#unicode
[minideb]: https://hub.docker.com/r/bitnami/minideb/
Version 0.3.3
@@ -1,18 +1,23 @@
# To correctly make a statically-linked binary, we use Alpine Linux.
# The distro entirely uses musl instead of glibc which is unfriendly to be
# statically linked.
FROM alpine:3.7 AS build
FROM bitnami/minideb:jessie AS build
RUN apk add --no-cache \
bash~4.4.19 \
build-base~0.5 \
ca-certificates \
curl~7.58.0 \
ghc~8.0.2 \
zlib-dev~1.2.11
RUN curl -sSL https://get.haskellstack.org/ | bash
ARG APT_REPOSITORY
RUN stack config set system-ghc --global true
RUN if [ "${APT_REPOSITORY}" != "" ]; then \
sed -i 's|http://httpredir\.debian\.org/debian|'"${APT_REPOSITORY}|" \
/etc/apt/sources.list; \
fi
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential ca-certificates curl \
&& \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
curl -sSL https://get.haskellstack.org/ | sh && \
rm -rf /var/lib/apt/lists/*
# Add just the package.yaml file to capture dependencies
COPY package.yaml /src/nirum/package.yaml
@@ -32,9 +37,9 @@ COPY . /src/nirum
RUN mkdir -p "/root/.local/bin"
RUN stack build --flag nirum:static --copy-bins
FROM alpine:3.7
FROM bitnami/minideb:jessie
RUN apk add --no-cache bash~4.4.19 ca-certificates
RUN install_packages bash ca-certificates
RUN mkdir -p /bin
COPY --from=build /root/.local/bin/nirum /bin/

0 comments on commit 54ebfef

Please sign in to comment.