Add in arch linux
This commit is contained in:
parent
3cb1d071f1
commit
6b87f8b1de
6 changed files with 87 additions and 1 deletions
22
base/arch/Dockerfile
Normal file
22
base/arch/Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
|||
FROM archlinux:latest
|
||||
|
||||
LABEL author="Tara Piccari" maintainer="tarapiccari@gmail.com"
|
||||
LABEL upstream="https://github.com/pelican-eggs/yolks"
|
||||
|
||||
RUN pacman -Sy
|
||||
RUN echo "y" | pacman -Syu
|
||||
RUN echo "y" | pacman -S base-devel git gcc cmake nasm
|
||||
|
||||
RUN useradd -m -d /home/container -s /bin/bash container
|
||||
|
||||
ENV USER=container HOME=/home/container
|
||||
|
||||
|
||||
WORKDIR /home/container
|
||||
STOPSIGNAL SIGINT
|
||||
|
||||
|
||||
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/bin/bash", "-c", "--"]
|
||||
CMD ["/entrypoint.sh"]
|
13
base/arch/entrypoint.sh
Normal file
13
base/arch/entrypoint.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
cd /home/container
|
||||
|
||||
# Make internal Docker IP address available to processes.
|
||||
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
|
||||
export INTERNAL_IP
|
||||
|
||||
# Replace Startup Variables
|
||||
MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
||||
echo -e ":/home/container$ ${MODIFIED_STARTUP}"
|
||||
|
||||
# Run the Server
|
||||
eval ${MODIFIED_STARTUP}
|
Loading…
Add table
Add a link
Reference in a new issue