Skip to content

Commit f8f7b55

Browse files
authored
task: Remove docker package setup. (#8959)
Keeping the index.js inside the docker folder to avoid our tsconfig having to be changed. In addition, updated the build to copy less of the folders into our final image, since we really only needed build and node_modules. Should reduce attack surface of the container.
1 parent a1f147d commit f8f7b55

File tree

7 files changed

+7
-4851
lines changed

7 files changed

+7
-4851
lines changed

Diff for: .dockerignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
*
22
!src
33
!package.json
4-
!docker
54
!yarn.lock
65
!scripts
76
!tsconfig.json
@@ -15,3 +14,4 @@ frontend/node_modules
1514
!.yarnrc.yml
1615
!frontend/.yarn/**
1716
node_modules
17+
!docker/index.js

Diff for: Dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ RUN yarn build:frontend:if-needed
1515

1616
RUN mkdir -p /unleash/build/frontend && mv /unleash/frontend/build /unleash/build/frontend/build
1717

18-
WORKDIR /unleash/docker
19-
2018
RUN yarn workspaces focus -A --production
2119

2220
FROM node:$NODE_VERSION
@@ -27,7 +25,11 @@ ENV TZ=UTC
2725

2826
WORKDIR /unleash
2927

30-
COPY --from=builder /unleash/docker /unleash
28+
COPY --from=builder /unleash/build /unleash/build
29+
30+
COPY --from=builder /unleash/node_modules /unleash/node_modules
31+
32+
COPY ./docker/index.js /unleash/index.js
3133

3234
RUN rm -rf /usr/local/lib/node_modules/npm/
3335

Diff for: docker/.yarn/releases/yarn-4.3.1.cjs

-894
This file was deleted.

Diff for: docker/.yarnrc.yml

-1
This file was deleted.

Diff for: docker/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const unleash = require('unleash-server');
3+
const unleash = require('./build');
44

55
let options = {};
66

Diff for: docker/package.json

-39
This file was deleted.

0 commit comments

Comments
 (0)