Skip to content

Commit 6fed642

Browse files
committed
Cypress docker build should be faster and added mkcert for later
1 parent 9f38617 commit 6fed642

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ EXPOSE 443
3434
COPY docker/rootfs /
3535
ADD backend /app
3636
ADD frontend/dist /app/frontend
37-
COPY global /app/global
37+
COPY global /app/global
3838

3939
WORKDIR /app
4040
RUN yarn install

docker/docker-compose.ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ services:
4747
cypress-mysql:
4848
image: ${IMAGE}-cypress:ci-${BUILD_NUMBER}
4949
build:
50-
context: ../
51-
dockerfile: test/cypress/Dockerfile
50+
context: ../test/
51+
dockerfile: cypress/Dockerfile
5252
environment:
5353
CYPRESS_baseUrl: "http://fullstack-mysql:81"
5454
volumes:
@@ -58,8 +58,8 @@ services:
5858
cypress-sqlite:
5959
image: ${IMAGE}-cypress:ci-${BUILD_NUMBER}
6060
build:
61-
context: ../
62-
dockerfile: test/cypress/Dockerfile
61+
context: ../test/
62+
dockerfile: cypress/Dockerfile
6363
environment:
6464
CYPRESS_baseUrl: "http://fullstack-sqlite:81"
6565
volumes:

test/.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

test/cypress/Dockerfile

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
FROM cypress/included:4.12.1
1+
FROM cypress/included:5.6.0
22

3-
COPY --chown=1000 ./test /test
3+
COPY --chown=1000 ./ /test
4+
5+
# mkcert
6+
ENV MKCERT=1.4.2
7+
RUN wget -O /usr/bin/mkcert "https://github.com/FiloSottile/mkcert/releases/download/v${MKCERT}/mkcert-v${MKCERT}-linux-amd64" \
8+
&& chmod +x /usr/bin/mkcert
49

510
WORKDIR /test
611
RUN yarn install

test/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"@jc21/cypress-swagger-validation": "^0.0.9",
88
"@jc21/restler": "^3.4.0",
99
"chalk": "^4.1.0",
10-
"cypress": "^4.12.1",
10+
"cypress": "^5.6.0",
1111
"cypress-multi-reporters": "^1.4.0",
1212
"cypress-plugin-retries": "^1.5.2",
1313
"eslint": "^7.6.0",

0 commit comments

Comments
 (0)