mirror of
https://github.com/valitydev/image-riak-base.git
synced 2024-11-06 10:15:24 +00:00
Working packer build
This commit is contained in:
parent
882958648c
commit
c984b15db1
6
Makefile
6
Makefile
@ -41,6 +41,8 @@ Dockerfile: Dockerfile.sh
|
||||
mkdir -p portage-root
|
||||
$(PACKER) build -var 'image-tag=$(TAG)' packer.json
|
||||
docker build -t $(SERVICE_IMAGE_NAME):$(TAG) .
|
||||
echo $(TAG) > $@
|
||||
|
||||
|
||||
test:
|
||||
$(DOCKER) run "$(SERVICE_IMAGE_NAME):$(shell cat .state)" \
|
||||
@ -52,4 +54,6 @@ push:
|
||||
clean:
|
||||
test -f .state \
|
||||
&& $(DOCKER) rmi -f "$(SERVICE_IMAGE_NAME):$(shell cat .state)" \
|
||||
&& rm .state
|
||||
&& rm .state \
|
||||
&& rm -rf portage-root
|
||||
|
||||
|
@ -2,31 +2,45 @@
|
||||
source /lib/gentoo/functions.sh
|
||||
|
||||
# XXX Fix broken build image
|
||||
USE="multitarget graphite go"
|
||||
emerge --getbinpkgonly --backtrack=50 glibc binutils binutils-libs gcc
|
||||
# fixes compilation errors like this one:
|
||||
# In file included from utils.c:36:0:
|
||||
# ../include/namespace.h:35:19: error: static declaration of 'setns' follows non-static declaration
|
||||
# static inline int setns(int fd, int nstype)
|
||||
# ^
|
||||
# In file included from /usr/include/sched.h:43:0,
|
||||
# from ../include/namespace.h:4,
|
||||
# from utils.c:36:
|
||||
# /usr/include/bits/sched.h:91:12: note: previous declaration of 'setns' was here
|
||||
# extern int setns (int __fd, int __nstype) __THROW;
|
||||
# ^
|
||||
USE="multitarget graphite go" emerge --getbinpkgonly --backtrack=50 glibc binutils binutils-libs gcc
|
||||
eselect binutils set x86_64-pc-linux-gnu-2.28.1
|
||||
gcc-config x86_64-pc-linux-gnu-5.4.0
|
||||
|
||||
# Set portage root and install stuff
|
||||
export ROOT=/tmp/portage-root
|
||||
export USE="-suid -pam -fdformat -ncurses -nls"
|
||||
|
||||
#export USE="-suid -pam -fdformat -ncurses -nls"
|
||||
#export USE="-suid"
|
||||
mkdir -p $ROOT/etc
|
||||
|
||||
ebegin "Setting locales to generate"
|
||||
cat <<EOF> $ROOT/etc/locale.gen
|
||||
en_DK.UTF-8 UTF-8
|
||||
EOF
|
||||
eend $? "Failed" || exit $?
|
||||
ebegin "Setting locales to preserve"
|
||||
cat <<EOF> $ROOT/etc/locale.nopurge
|
||||
MANDELETE
|
||||
SHOWFREEDSPACE
|
||||
en_DK.UTF-8 UTF-8
|
||||
EOF
|
||||
eend $? "Failed" || exit $?
|
||||
#ebegin "Setting locales to generate"
|
||||
#cat <<EOF> $ROOT/etc/locale.gen
|
||||
#en_DK.UTF-8 UTF-8
|
||||
#EOF
|
||||
#eend $? "Failed" || exit $?
|
||||
#ebegin "Setting locales to preserve"
|
||||
#cat <<EOF> $ROOT/etc/locale.nopurge
|
||||
#MANDELETE
|
||||
#SHOWFREEDSPACE
|
||||
#en_DK.UTF-8 UTF-8
|
||||
#EOF
|
||||
#eend $? "Failed" || exit $?
|
||||
|
||||
|
||||
emerge --quiet-build=n --verbose --verbose-conflicts --tree openssl iproute2 grep gawk \
|
||||
coreutils attr util-linux net-misc/curl sed
|
||||
#emerge --quiet-build=n --verbose --verbose-conflicts --tree openssl iproute2 grep gawk \
|
||||
# coreutils attr net-misc/curl sed
|
||||
emerge glibc coreutils sed grep gawk attr net-misc/curl openssl iproute2 bash
|
||||
|
||||
rm -rf $ROOT/var/cache/edb/*
|
||||
|
||||
#rm -rf $ROOT/var/cache/edb/*
|
||||
|
Loading…
Reference in New Issue
Block a user