Skip to content

Commit 525afaa

Browse files
author
Meenachisundaram Velmurugan
committed
Merge branch 'master' of gitlab.com:codespaces/codespace-docker
2 parents 633054d + 7c7657a commit 525afaa

File tree

7 files changed

+24
-60
lines changed

7 files changed

+24
-60
lines changed

codebox/128.png

-214 KB
Binary file not shown.

codebox/entrypoint.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

codebox/motd.sh

Lines changed: 0 additions & 30 deletions
This file was deleted.

codebox/Dockerfile renamed to controller/Dockerfile

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@ RUN apt-get update && \
88
apt-get install -y make g++ python git curl wget openssh-server sudo vim libdevmapper-dev && \
99
curl -sL https://deb.nodesource.com/setup | sudo bash - && \
1010
apt-get install -y nodejs && \
11-
npm -g install node-gyp codebox && \
12-
cd /usr/lib/node_modules/codebox/node_modules/shux/node_modules/pty.js && \
11+
npm -g install node-gyp akurath && \
12+
cd /usr/lib/node_modules/akurath/node_modules/shux/node_modules/pty.js && \
1313
make clean && \
1414
make
1515

16-
ENV CODEBOX_USERNAME your_username
17-
ENV CODEBOX_PASSWORD password
18-
19-
COPY 128.png /usr/lib/node_modules/codebox/client/build/static/images/icons
20-
21-
RUN chown nobody.root /usr/lib/node_modules/codebox/client/build/static/images/icons/128.png && \
22-
chmod 644 /usr/lib/node_modules/codebox/client/build/static/images/icons/128.png
23-
2416
RUN mkdir /var/run/sshd && \
2517
wget -qO- https://get.docker.com/ | sh && \
2618
curl -L "https://github.com/docker/compose/releases/download/1.10.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
@@ -35,10 +27,8 @@ RUN chmod +x /opt/motd.sh && \
3527
RUN useradd -ms /bin/bash devops && \
3628
echo 'devops:codespaces' |chpasswd && \
3729
adduser devops sudo && \
38-
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
30+
echo 'devops ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
3931

4032
EXPOSE 22 8000
4133

42-
ADD ./entrypoint.sh /entrypoint.sh
43-
44-
ENTRYPOINT ["/entrypoint.sh"]
34+
CMD /usr/bin/akurath run

controller/motd.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
echo 'PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAg
4+
ICAgICAgICAgICAgXyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICBfX18g
5+
X19fICAgX198IHwgX19fICBfX18gXyBfXyAgIF9fIF8gIF9fXyBfX18gIF9fXyAKIC8gX18vIF8g
6+
XCAvIF9gIHwvIF8gXC8gX198ICdfIFwgLyBfYCB8LyBfXy8gXyBcLyBfX3wKfCAoX3wgKF8pIHwg
7+
KF98IHwgIF9fL1xfXyBcIHxfKSB8IChffCB8IChffCAgX18vXF9fIFwKIFxfX19cX19fLyBcX18s
8+
X3xcX19ffHxfX18vIC5fXy8gXF9fLF98XF9fX1xfX198fF9fXy8KICAgICAgICAgICAgICAgICAg
9+
ICAgICAgICB8X3wgICAgICAgICAgICAgICAgICAgICAgICAKCiBEZXZvcHMgV29ya3NwYWNlcyBp
10+
biBhIEJveCAhICAgICAgd3d3LmNvZGVzcGFjZXMuaW8KCj09PT09PT09PT09PT09PT09PT09PT09
11+
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Cgo=' | base64 --decode > /etc/motd

docker-compose.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,17 @@ networks:
66

77
services:
88
docker:
9-
image: schoolofdevops/docker-controller:v1.0
9+
image: docker-controller
1010
ports:
1111
- "8000:8000"
12-
- "2222:22"
1312
- "80:80"
1413
environment:
15-
CODEBOX_USERNAME: devops
16-
CODEBOX_PASSWORD: codespaces
1714
JAVA_ARGS: "-Xms256m -Xmx256m -XX:MaxPermSize=256m"
1815
volumes:
1916
- /control:/workspace
2017
- /var/run/docker.sock:/var/run/docker.sock
21-
networks:
22-
- codespace
18+
network_mode: host
2319
container_name: docker
24-
domainname: schoolofdevops.com
20+
domainname: codespaces.io
2521
hostname: docker
22+
restart: always

packer-ubuntu/files/docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818
networks:
1919
- custom
2020
container_name: control
21-
domainname: schoolofdevops.com
21+
domainname: codespaces.io
2222
hostname: control
2323
lb:
2424
image: schoolofdevops/centos-node:v1.1
@@ -28,7 +28,7 @@ services:
2828
- "8080:80"
2929
networks:
3030
- custom
31-
domainname: schoolofdevops.com
31+
domainname: codespaces.io
3232
hostname: lb
3333
app1:
3434
image: schoolofdevops/centos-node:v1.1
@@ -38,7 +38,7 @@ services:
3838
networks:
3939
- custom
4040
container_name: app1
41-
domainname: schoolofdevops.com
41+
domainname: codespaces.io
4242
hostname: app1
4343
app2:
4444
image: schoolofdevops/ubuntu-node:v1.1
@@ -48,7 +48,7 @@ services:
4848
networks:
4949
- custom
5050
container_name: app2
51-
domainname: schoolofdevops.com
51+
domainname: codespaces.io
5252
hostname: app2
5353
db:
5454
image: schoolofdevops/centos-node:v1.1
@@ -58,5 +58,5 @@ services:
5858
networks:
5959
- custom
6060
container_name: db
61-
domainname: schoolofdevops.com
61+
domainname: codespaces.io
6262
hostname: db

0 commit comments

Comments
 (0)