Skip to content

Commit 3bc50a8

Browse files
committed
inital commit
0 parents  commit 3bc50a8

File tree

4 files changed

+140
-0
lines changed

4 files changed

+140
-0
lines changed

Dockerfile

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
FROM selenium/standalone-chrome:latest
2+
3+
# Variables
4+
ENV MAVEN_VERSION=3.6.0 \
5+
MAVEN_HOME=/usr/lib/mvn \
6+
NODE_VERSION=10.14.2 \
7+
SHELL=/bin/bash \
8+
LANG=en_US.UTF-8 \
9+
CSVER=3.0.0
10+
ENV PATH $MAVEN_HOME/bin:/usr/local/bin:$PATH
11+
12+
# Packages
13+
14+
USER root
15+
16+
RUN apt-get update \
17+
&& apt-get install -y openjdk-11-jdk \
18+
curl \
19+
dumb-init \
20+
&& curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - \
21+
&& apt-get install -y \
22+
nodejs \
23+
maven \
24+
net-tools \
25+
git \
26+
&& apt-get clean \
27+
&& rm -rf /var/lib/apt/lists/* \
28+
&& rm -rf /var/cache/oracle-jdk11-installer \
29+
&& npm install -g npmlog \
30+
&& mkdir /automation \
31+
&& curl -SsL https://downloads.gauge.org/stable | sh \
32+
&& gauge install java \
33+
&& gauge install js \
34+
&& gauge install screenshot \
35+
&& gauge install html-report \
36+
&& gauge install xml-report
37+
38+
# https://wiki.debian.org/Locale#Manually
39+
RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen \
40+
&& locale-gen \
41+
&& chsh -s /bin/bash \
42+
&& echo "seluser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
43+
44+
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 - && \
45+
chown root:root /usr/local/bin/fixuid && \
46+
chmod 4755 /usr/local/bin/fixuid && \
47+
mkdir -p /etc/fixuid && \
48+
printf "user: seluser\ngroup: seluser\n" > /etc/fixuid/config.yml
49+
50+
RUN cd /tmp && \
51+
curl -SsL https://github.com/cdr/code-server/releases/download/$CSVER/code-server-${CSVER}-linux-x86_64.tar.gz | tar -xzf - && \
52+
mv code-server* /usr/local/lib/code-server && \
53+
ln -s /usr/local/lib/code-server/code-server /usr/local/bin/code-server
54+
55+
USER seluser
56+
RUN /usr/local/bin/code-server --install-extension getgauge.gauge
57+
58+
EXPOSE 8080
59+
WORKDIR /home/seluser
60+
ENTRYPOINT ["dumb-init", "fixuid", "-q", "/usr/local/bin/code-server", "--host", "0.0.0.0", "."]

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
vscode-docker
2+
======================
3+
4+
Docker image for vscode
5+
6+
Installation
7+
------------
8+
9+
If you are using linux, install docker: http://docs.docker.com/linux/step_one/
10+
On mac and windows, install docker toolbox: https://www.docker.com/toolbox
11+
12+
Clone this repo
13+
14+
From repo folder:
15+
16+
## Two Methods
17+
### Vagrant:
18+
# Install vagrant: using http://vagrantup.com/downloads.html
19+
20+
vagrant up
21+
22+
# Open a browser to http://localhost:8080 and use password `softrams`
23+
24+
# enjoy your docker 'virtual' machine!
25+
26+
### Docker Compose:
27+
28+
docker-compose up -d
29+
30+
# to bring it down
31+
32+
docker-compose down
33+
34+
## Tests
35+
### Steps to run tests:
36+
37+
make sure you clone your repo containing your automation code. (This can be done locally or from vscode)
38+
using the terminal window in vscode, change directories to where you cloned your automation code.
39+
try running
40+
41+
mvn test-compile gauge:execute -DspecsDir="specs/signin" -Denv="hotfix-dev-headless"
42+

Vagrantfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5+
VAGRANTFILE_API_VERSION = "2"
6+
#Check if you have the good Vagrant version to use docker provider...
7+
Vagrant.require_version ">= 1.6.0"
8+
9+
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
10+
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'docker'
11+
12+
config.vm.box_check_update = false
13+
14+
config.vm.network "forwarded_port", guest: 8080, host: 8080
15+
16+
if Vagrant::Util::Platform.windows?
17+
config.vm.synced_folder ENV['USERPROFILE'], "/home/coder", docker_consistency: "consistent"
18+
else
19+
config.vm.synced_folder ENV['HOME'], "/home/coder", docker_consistency: "consistent"
20+
end
21+
22+
config.vm.provider "docker" do |d|
23+
d.image = "registry.gitlab.com/softrams-public/vscode-docker"
24+
d.env = {
25+
"PASSWORD" => "softrams"
26+
}
27+
end
28+
end

docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '3'
2+
services:
3+
vscode:
4+
image: "registry.gitlab.com/softrams-public/vscode-docker"
5+
ports:
6+
- "8080:8080"
7+
environment:
8+
- PASSWORD=softrams
9+
volumes:
10+
- ~/:/home/seluser

0 commit comments

Comments
 (0)