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:
parent
a1f147dfef
commit
f8f7b55a53
@ -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
|
||||
|
@ -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/
|
||||
|
||||
|
894
docker/.yarn/releases/yarn-4.3.1.cjs
vendored
894
docker/.yarn/releases/yarn-4.3.1.cjs
vendored
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
yarnPath: .yarn/releases/yarn-4.3.1.cjs
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const unleash = require('unleash-server');
|
||||
const unleash = require('./build');
|
||||
|
||||
let options = {};
|
||||
|
||||
|
@ -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"
|
||||
}
|
3912
docker/yarn.lock
3912
docker/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user