HUB
Sign inSign up
thrift logo

huiyifyj/thrift

By huiyifyj

•Updated over 5 years ago

[⚠️ Obsolete & Outdated] Docker image for thrift.

Image
Developer tools
0

592

huiyifyj/thrift repository overview

⁠Thrift for docker

pull

⁠Install
docker pull huiyifyj/thrift
#### Usage
```shell
docker run -v "$PWD:/data" huiyifyj/thrift thrift \
    -out /data --gen go:thrift_import=github.com/huiyifyj/thrift \
    /data/test.thrift

⁠Dockerfile

  • 0.10.0
# compile build stage
FROM debian:buster-slim AS builder

ENV THRIFT_VERSION 0.10.0

RUN buildDeps="automake bison ca-certificates curl flex g++ make pkg-config libtool \
	    libboost-dev libboost-filesystem-dev libboost-program-options-dev \
		libboost-system-dev libboost-test-dev libevent-dev libssl-dev"; \
	apt-get update && apt-get install -y --no-install-recommends $buildDeps; \
	curl -sSL "https://github.com/apache/thrift/archive/${THRIFT_VERSION}.tar.gz" -o thrift.tar.gz; \
	mkdir -p /usr/src/thrift; \
	tar zxf thrift.tar.gz -C /usr/src/thrift --strip-components=1; \
	rm -rf thrift.tar.gz; \
	cd /usr/src/thrift; \
	./bootstrap.sh; \
	./configure --disable-libs; \
	make; \
	make install; \
	# Convenient for `COPY` file in next stage
	mv `which thrift` /bin/thrift

# main stage
FROM debian:buster-slim

COPY --from=builder /bin/thrift /usr/local/bin/thrift

CMD [ "thrift" ]
  • 0.13.0
# compile build stage
FROM debian:buster-slim AS builder

ENV THRIFT_VERSION v0.13.0

RUN buildDeps="automake bison curl flex g++ make pkg-config libtool \
		libboost-dev libboost-filesystem-dev libboost-program-options-dev \
		libboost-system-dev libboost-test-dev libevent-dev libssl-dev"; \
	apt-get update && apt-get install -y --no-install-recommends $buildDeps; \
	curl -k -sSL "https://github.com/apache/thrift/archive/${THRIFT_VERSION}.tar.gz" -o thrift.tar.gz; \
	mkdir -p /usr/src/thrift; \
	tar zxf thrift.tar.gz -C /usr/src/thrift --strip-components=1; \
	rm -rf thrift.tar.gz; \
	cd /usr/src/thrift; \
	./bootstrap.sh; \
	./configure --disable-libs; \
	make; \
	make install; \
	# Convenient for `COPY` file in next stage
	mv `which thrift` /bin/thrift

# main stage
FROM debian:buster-slim

COPY --from=builder /bin/thrift /usr/local/bin/thrift

CMD [ "thrift" ]
Tag summary
Recent tags
Content type
Image
Digest
Size
56.4 MB
Last updated
over 5 years ago
docker pull huiyifyj/thrift:latest