1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

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.
This commit is contained in:
Christopher Kolstad 2024-12-11 13:50:38 +01:00 committed by GitHub
parent a1f147dfef
commit f8f7b55a53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 7 additions and 4851 deletions

View File

@ -1,7 +1,6 @@
*
!src
!package.json
!docker
!yarn.lock
!scripts
!tsconfig.json
@ -15,3 +14,4 @@ frontend/node_modules
!.yarnrc.yml
!frontend/.yarn/**
node_modules
!docker/index.js

View File

@ -15,8 +15,6 @@ RUN yarn build:frontend:if-needed
RUN mkdir -p /unleash/build/frontend && mv /unleash/frontend/build /unleash/build/frontend/build
WORKDIR /unleash/docker
RUN yarn workspaces focus -A --production
FROM node:$NODE_VERSION
@ -27,7 +25,11 @@ ENV TZ=UTC
WORKDIR /unleash
COPY --from=builder /unleash/docker /unleash
COPY --from=builder /unleash/build /unleash/build
COPY --from=builder /unleash/node_modules /unleash/node_modules
COPY ./docker/index.js /unleash/index.js
RUN rm -rf /usr/local/lib/node_modules/npm/

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
yarnPath: .yarn/releases/yarn-4.3.1.cjs

View File

@ -1,6 +1,6 @@
'use strict';
const unleash = require('unleash-server');
const unleash = require('./build');
let options = {};

View File

@ -1,39 +0,0 @@
{
"name": "unleash-docker",
"description": "Docker images for unleash.",
"main": "index.js",
"scripts": {
"start": "NODE_ENV=production node index.js",
"test:ci": "echo 'no tests for unleash-docker'"
},
"engines": {
"node": ">=20"
},
"author": "",
"license": "ISC",
"dependencies": {
"unleash-server": "file:../build"
},
"resolutions": {
"async": "^3.2.4",
"es5-ext": "0.10.64",
"node-forge": "^1.0.0",
"set-value": "^4.0.1",
"ansi-regex": "^5.0.1",
"ssh2": "^1.4.0",
"json-schema": "^0.4.0",
"ip": "^2.0.1",
"minimatch": "^5.0.0",
"path-scurry": "1.11.1",
"semver": "^7.5.3"
},
"overrides": {
"set-value": "^4.0.1",
"ansi-regex": "^5.0.1",
"ssh2": "^1.4.0",
"json-schema": "^0.4.0",
"semver": "^7.5.3"
},
"version": "6.0.1",
"packageManager": "yarn@4.5.3"
}

File diff suppressed because it is too large Load Diff