Add 'laughing-octo/' from commit 'ee815e9ccc
'
git-subtree-dir: laughing-octo git-subtree-mainline:264531c268
git-subtree-split:ee815e9ccc
This commit is contained in:
commit
d59b1af998
17 changed files with 1433 additions and 0 deletions
18
laughing-octo/xterm/Dockerfile.sh
Normal file
18
laughing-octo/xterm/Dockerfile.sh
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
cat <<EOM
|
||||
FROM fedora:latest
|
||||
|
||||
RUN yum install -y xterm
|
||||
#RUN yum update -y && yum clean all
|
||||
|
||||
RUN useradd -m -u $(id -u ${USER}) -G wheel ${USER} && \
|
||||
sed -ri 's/^(%wheel.*)(ALL)$/\1NOPASSWD: \2/' /etc/sudoers
|
||||
|
||||
|
||||
CMD bash -l
|
||||
USER ${USER}
|
||||
ENV HOME ${HOME}
|
||||
WORKDIR ${HOME}
|
||||
EOM
|
||||
|
37
laughing-octo/xterm/Makefile
Normal file
37
laughing-octo/xterm/Makefile
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
COMMAND := xterm
|
||||
IMAGE := $(USER)/$(COMMAND)
|
||||
DOCKER := $(shell which docker)
|
||||
|
||||
default: run
|
||||
|
||||
Dockerfile: Dockerfile.sh
|
||||
sh $< > $@
|
||||
|
||||
build: Dockerfile
|
||||
$(DOCKER) build -t $(IMAGE) .
|
||||
|
||||
run: build
|
||||
$(DOCKER) run \
|
||||
--rm \
|
||||
-it \
|
||||
--hostname="$(shell hostname)-$(IMAGE)" \
|
||||
--env DISPLAY \
|
||||
--env HOME \
|
||||
--env PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin \
|
||||
--env SESSION_MANAGER \
|
||||
--env SSH_AUTH_SOCK \
|
||||
--env XAUTHORITY \
|
||||
--privileged \
|
||||
--user $(USER) \
|
||||
--workdir $(shell pwd) \
|
||||
-v $(HOME):$(HOME) \
|
||||
-v $(SSH_AUTH_SOCK):$(SSH_AUTH_SOCK) \
|
||||
-v /tmp/:/tmp/ \
|
||||
$(IMAGE) \
|
||||
$(COMMAND)
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf *~ Dockerfile
|
||||
|
20
laughing-octo/xterm/README.md
Normal file
20
laughing-octo/xterm/README.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# xterm container!
|
||||
|
||||
## Building
|
||||
|
||||
$> make build
|
||||
|
||||
Since the container maps user name and UID into the image, the Dockerfile.sh is used to generate the Dockerfile.
|
||||
|
||||
## Running
|
||||
|
||||
$> make run
|
||||
|
||||
This cobbles together a docker run command to connect the container to your host's Xorg server.
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
|
||||

|
||||
|
Loading…
Add table
Add a link
Reference in a new issue