Skip to content

Commit 869b2ad

Browse files
authored
fix Dockerfiles
1 parent 0302790 commit 869b2ad

2 files changed

Lines changed: 3 additions & 29 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Build Alpine Node.js
22
permissions:
33
contents: read
4-
packages: write
54

65
on:
76
workflow_dispatch:
@@ -22,14 +21,6 @@ jobs:
2221
- name: Build the Docker image
2322
run: |
2423
docker build --file Dockerfile --tag alpine_nodejs:${{github.event.inputs.NodeVersion}} --build-arg NodeVersion=${{github.event.inputs.NodeVersion}} --build-arg PythonVersion=${{github.event.inputs.PythonVersion}} .
25-
- name: Login to GitHub Container Registry
26-
uses: docker/login-action@v1
27-
with:
28-
registry: ghcr.io
29-
username: ${{ github.actor }}
30-
password: ${{ secrets.GITHUB_TOKEN }}
31-
- name: Debugging with tmate
32-
uses: mxschmitt/action-tmate@v3
3324
- name: Copy alpine node.js out
3425
run: |
3526
mkdir $RUNNER_TEMP/alpine_node
@@ -55,20 +46,3 @@ jobs:
5546
tar xzf ./node-${{github.event.inputs.NodeVersion}}-alpine-x64.tar.gz
5647
./bin/node -v
5748
./bin/node -e "console.log('hello world')"
58-
59-
60-
61-
62-
63-
64-
65-
66-
67-
68-
69-
70-
71-
72-
73-
74-

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ RUN wget https://nodejs.org/dist/$NodeVersion/node-$NodeVersion.tar.gz && tar -z
1414
RUN cd node-$NodeVersion && ./configure --dest-cpu=x64 --partly-static && make -j$(getconf _NPROCESSORS_ONLN)
1515

1616
# create and copy tar.gz into /node_staging
17-
RUN mkdir -p /usr/src/out
17+
RUN mkdir -p /usr/src/out/bin
1818
WORKDIR /usr/src/out
19-
RUN cp /usr/src/app/node-$NodeVersion/out/Release/node /usr/src/out/bin
19+
RUN cp /usr/src/app/node-$NodeVersion/out/Release/node /usr/src/out/bin/node
2020
RUN cp /usr/src/app/node-$NodeVersion/LICENSE /usr/src/out/LICENSE
21-
RUN tar -czvf node-$NodeVersion-alpine-x64.tar.gz ./bin ./LICENSE
21+
RUN tar -czvf node-$NodeVersion-alpine-x64.tar.gz ./bin ./LICENSE && rm -rf ./bin ./LICENSE
2222
RUN cp ./node-$NodeVersion-alpine-x64.tar.gz /node_staging
2323

2424
# copy the tar.gz into the mapped in volume

0 commit comments

Comments
 (0)