Skip to content

Commit

Permalink
Fix alpine Dockerfile to add *-static packages and update to alpine 3…
Browse files Browse the repository at this point in the history
….13 (#79)

* Use *-static packages in alpine dockerfile

And remove unnecessary *-dev because they're already dependencies of
*-static

* Update alpine dockerfile to 3.13

* Remove unnecessary package llvm10-dev in linux Dockerfile

Included in llvm10-static

* Update linux build image to alpine:3.13
  • Loading branch information
straight-shoota authored Jan 27, 2021
1 parent 80c83b2 commit bdff883
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docker/alpine.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM alpine:3.12 as runtime
FROM alpine:3.13 as runtime

RUN \
apk add --update --no-cache --force-overwrite \
# core dependencies
gc-dev gcc gmp-dev libatomic_ops libevent-static musl-dev pcre-dev \
# stdlib dependencies
libxml2-dev openssl-dev openssl-libs-static tzdata yaml-dev zlib-static \
libxml2-dev openssl-libs-static tzdata yaml-static zlib-static \
# dev tools
make git

Expand All @@ -31,6 +31,6 @@ FROM runtime as build

RUN \
apk add --update --no-cache --force-overwrite \
llvm10-dev llvm10-static g++
llvm10-static g++

CMD ["/bin/sh"]
2 changes: 1 addition & 1 deletion linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ RUN sed -i 's|--list -- "$@"|--list "$@"|' /usr/bin/ldd
# Install dependencies
RUN apk add --no-cache \
# Statically-compiled llvm
llvm10-dev llvm10-static \
llvm10-static \
# Static zlib, libyaml, libxml2, pcre, and libevent
zlib-static yaml-static libxml2-dev pcre-dev libevent-static \
# Build tools
Expand Down
4 changes: 2 additions & 2 deletions linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ BUILD_ARGS_COMMON = $(DOCKER_BUILD_ARGS) \
BUILD_ARGS64 = $(BUILD_ARGS_COMMON) \
--build-arg previous_crystal_release=$(PREVIOUS_CRYSTAL_RELEASE_LINUX64_TARGZ) \
--build-arg debian_image=debian:10 \
--build-arg alpine_image=alpine:3.12 \
--build-arg alpine_image=alpine:3.13 \
--build-arg musl_target=x86_64-linux-musl \
--build-arg gnu_target=x86_64-unknown-linux-gnu

BUILD_ARGS32 = $(BUILD_ARGS_COMMON) \
--build-arg previous_crystal_release=$(PREVIOUS_CRYSTAL_RELEASE_LINUX32_TARGZ) \
--build-arg debian_image=i386/debian:10 \
--build-arg alpine_image=i386/alpine:3.12 \
--build-arg alpine_image=i386/alpine:3.13 \
--build-arg musl_target=i686-linux-musl \
--build-arg gnu_target=i686-unknown-linux-gnu

Expand Down

0 comments on commit bdff883

Please sign in to comment.