Skip to content

Commit 4bd2bb7

Browse files
committed
change path for mount, and fix
1 parent d91212d commit 4bd2bb7

File tree

3 files changed

+27
-14
lines changed

3 files changed

+27
-14
lines changed

Dockerfile

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ ENV MAVEN_VERSION=3.6.0 \
77
SHELL=/bin/bash \
88
LANG=en_US.UTF-8 \
99
CSVER=3.0.0 \
10-
GAUGE_VER=1.0.8
10+
GAUGE_VER=1.0.8 \
11+
VAULT_VER=1.3.4 \
12+
PATH=$MAVEN_HOME/bin:/usr/local/bin:$PATH
1113

12-
ENV PATH $MAVEN_HOME/bin:/usr/local/bin:$PATH
14+
COPY docker-entrypoint.sh /usr/local/bin/
1315

1416
# Packages
1517
USER root
@@ -34,6 +36,12 @@ RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen \
3436
&& chsh -s /bin/bash \
3537
&& echo "seluser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
3638

39+
# Install Vault
40+
RUN curl -SsL -o vault.zip https://releases.hashicorp.com/vault/${VAULT_VER}/vault_${VAULT_VER}_linux_amd64.zip \
41+
&& unzip -q vault.zip \
42+
&& cp ./vault /usr/local/bin/
43+
44+
3745
# Install Gauge
3846
RUN curl -SsL -o gauge.zip https://github.com/getgauge/gauge/releases/download/v${GAUGE_VER}/gauge-${GAUGE_VER}-linux.x86_64.zip \
3947
&& unzip -q gauge.zip \
@@ -47,23 +55,22 @@ RUN curl -SsL -o gauge.zip https://github.com/getgauge/gauge/releases/download/v
4755
&& gauge install xml-report
4856

4957
# Install fixuid
50-
RUN curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.4/fixuid-0.4-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - && \
51-
chown root:root /usr/local/bin/fixuid && \
52-
chmod 4755 /usr/local/bin/fixuid && \
53-
mkdir -p /etc/fixuid && \
54-
printf "user: seluser\ngroup: seluser\n" > /etc/fixuid/config.yml
58+
RUN curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.4/fixuid-0.4-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - \
59+
&& chown root:root /usr/local/bin/fixuid \
60+
&& chmod 4755 /usr/local/bin/fixuid \
61+
&& mkdir -p /etc/fixuid \
62+
&& printf "user: seluser\ngroup: seluser\n" > /etc/fixuid/config.yml
5563

5664
# Install Code-Server
5765
RUN cd /tmp && \
58-
curl -SsL https://github.com/cdr/code-server/releases/download/${CSVER}/code-server-${CSVER}-linux-x86_64.tar.gz | tar -xzf - && \
59-
mv code-server* /usr/local/lib/code-server && \
60-
ln -s /usr/local/lib/code-server/code-server /usr/local/bin/code-server
66+
curl -SsL https://github.com/cdr/code-server/releases/download/${CSVER}/code-server-${CSVER}-linux-x86_64.tar.gz | tar -xzf - \
67+
&& mv code-server* /usr/local/lib/code-server \
68+
&& ln -s /usr/local/lib/code-server/code-server /usr/local/bin/code-server
6169

6270
USER seluser
6371

6472
EXPOSE 8080
6573
WORKDIR /home/seluser
6674

67-
RUN mkdir -p /home/seluser/workspace && /usr/local/bin/code-server --install-extension getgauge.gauge
68-
69-
ENTRYPOINT ["dumb-init", "fixuid", "-q", "/usr/local/bin/code-server", "--host", "0.0.0.0", "/home/seluser/workspace"]
75+
ENTRYPOINT ["docker-entrypoint.sh"]
76+
CMD ["dumb-init", "fixuid", "-q", "/usr/local/bin/code-server", "--host", "0.0.0.0", "/home/seluser"]

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ services:
77
environment:
88
- PASSWORD=softrams
99
volumes:
10-
- ~/automation-projects/:/home/seluser/workspace/
10+
- ~/:/home/seluser

docker-entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
set -e
3+
4+
code-server --install-extension getgauge.gauge
5+
6+
exec "$@"

0 commit comments

Comments
 (0)