Skip to content

Commit f2c1e13

Browse files
Remove building custom libgc on alpine, use gc-dev package (#261)
1 parent e15cbd3 commit f2c1e13

File tree

2 files changed

+3
-22
lines changed

2 files changed

+3
-22
lines changed

docker/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ CRYSTAL_TARGZ ?= ## Which crystal.tar.gz file to install in docker images (u
1414
DOCKER_TAG ?= $(CRYSTAL_VERSION)## How to tag the docker image (examples: `0.27.2`, `nightly20190307`). `-build` will be appended for build images.
1515
DOCKER_REPOSITORY ?= crystallang/crystal## Docker hub repository to commit image
1616

17-
GC_VERSION = v8.2.0
18-
1917
OUTPUT_DIR := build
2018
BUILD_CONTEXT := $(CURDIR)/build-context
2119
BUILD_ARGS_UBUNTU64 := --build-arg crystal_targz=crystal.tar.gz $(BUILD_CONTEXT)/ubuntu64
22-
BUILD_ARGS_ALPINE := --build-arg crystal_targz=crystal.tar.gz $(BUILD_CONTEXT)/alpine --build-arg gc_version=$(GC_VERSION)
20+
BUILD_ARGS_ALPINE := --build-arg crystal_targz=crystal.tar.gz $(BUILD_CONTEXT)/alpine
2321
DOCKER_TAG_UBUNTU := $(DOCKER_REPOSITORY):$(DOCKER_TAG)
2422
DOCKER_TAG_ALPINE := $(DOCKER_REPOSITORY):$(DOCKER_TAG)-alpine
2523

docker/alpine.Dockerfile

+2-19
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,9 @@ RUN \
66
# core dependencies
77
gcc gmp-dev libevent-static musl-dev pcre-dev pcre2-dev \
88
# stdlib dependencies
9-
libxml2-dev libxml2-static openssl-dev openssl-libs-static tzdata yaml-static zlib-static xz-static \
9+
gc-dev libxml2-dev libxml2-static openssl-dev openssl-libs-static tzdata yaml-static zlib-static xz-static \
1010
# dev tools
11-
make git \
12-
# build libgc dependencies
13-
autoconf automake libtool patch
14-
15-
# Build libgc
16-
ARG gc_version
17-
18-
RUN git clone https://github.com/ivmai/bdwgc \
19-
&& cd bdwgc \
20-
&& git checkout ${gc_version} \
21-
\
22-
&& ./autogen.sh \
23-
&& ./configure --disable-debug --disable-shared --enable-large-config \
24-
&& make -j$(nproc) CFLAGS=-DNO_GETCONTEXT \
25-
&& make install
26-
27-
# Remove build tools from image now that libgc is built
28-
RUN apk del -r --purge autoconf automake libtool patch
11+
make git
2912

3013
ARG crystal_targz
3114
COPY ${crystal_targz} /tmp/crystal.tar.gz

0 commit comments

Comments
 (0)