Browse Source

anopa-docker: added files.

master
Nagy Károly Gábriel 9 years ago
parent
commit
ad72a5bbb7
  1. 24
      Dockerfile
  2. 7
      build.sh
  3. 16
      run.sh

24
Dockerfile

@ -0,0 +1,24 @@
FROM gliderlabs/alpine:edge
RUN apk add --update alpine-sdk s6 strace linux-headers skalibs-dev s6-dev
RUN rm -rf /var/cache/apk/*
ENV USER karasz
ENV HOME /home/${USER}
RUN addgroup -g 1500 builder
RUN adduser ${USER} -h ${HOME} -s /bin/sh -u 1000 -G builder -D
RUN echo "${USER} ALL=(root) NOPASSWD: ALL" > /etc/sudoers.d/${USER}
USER ${USER}
WORKDIR $HOME
# Get Anopa
RUN cd ${HOME}
RUN wget http://jjacky.com/anopa/anopa-0.2.0.tar.gz
RUN tar xzvf anopa-0.2.0.tar.gz
RUN cd anopa-0.2.0 && ./configure --prefix=/usr && make clean && make && sudo make install
RUN sudo mkdir -p /etc/anopa/env
RUN sudo ln -svf /usr/libexec/aa-stage1 /sbin/init
ENTRYPOINT ["/sbin/init"]
#ENTRYPOINT ["sh"]

7
build.sh

@ -0,0 +1,7 @@
#!/bin/sh
set -eux
TAG="$USER/alpine-sdk"
exec docker build --rm -t "$TAG" .

16
run.sh

@ -0,0 +1,16 @@
#!/bin/sh
set -eu
TAG="$USER/alpine-sdk"
mkdir -p ~/docker-run-cache/$USER
set --
# capabilities
for x in SYS_ADMIN SYS_CHROOT SYS_PTRACE FOWNER; do
set -- "$@" --cap-add $x
done
set -x
exec docker run -it "$@" "$TAG"
Loading…
Cancel
Save