Skip to content

Commit

Permalink
restructure and update arm build files
Browse files Browse the repository at this point in the history
  • Loading branch information
tagyoureit committed Apr 20, 2024
1 parent 3c9dd53 commit 0e932a8
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 11 deletions.
14 changes: 10 additions & 4 deletions Dockerfile.armv6 → .docker/Dockerfile.armv6
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
# Use a base image compatible with ARMv6 architecture
FROM arm32v6/node:14-alpine

# Install necessary build dependencies
RUN apk add --no-cache make gcc g++ python3 linux-headers udev tzdata git

# Set the working directory
WORKDIR /app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN npm install
# Install dependencies (both development and production)
RUN npm ci

# Copy the rest of the application
COPY . .

# Build the application
RUN npm run build

# Expose the port
# Set environment variables
ENV NODE_ENV=production

# Expose the port (if applicable)
EXPOSE 4200

# Command to run the application
CMD ["npm", "start"]
CMD ["node", "dist/app.js"]
14 changes: 10 additions & 4 deletions Dockerfile.armv7 → .docker/Dockerfile.armv7
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
# Use a base image compatible with ARMv7 architecture
FROM arm32v7/node:14-alpine

# Install necessary build dependencies
RUN apk add --no-cache make gcc g++ python3 linux-headers udev tzdata git

# Set the working directory
WORKDIR /app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN npm install
# Install dependencies (both development and production)
RUN npm ci

# Copy the rest of the application
COPY . .

# Build the application
RUN npm run build

# Expose the port
# Set environment variables
ENV NODE_ENV=production

# Expose the port (if applicable)
EXPOSE 4200

# Command to run the application
CMD ["npm", "start"]
CMD ["node", "dist/app.js"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 9 additions & 3 deletions .github/workflows/docker-publish-njsPC-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Build and push Linux Docker image (x86_64)
uses: docker/build-push-action@v4
with:
context: .
context: ./.docker
file: ./Dockerfile.linux
push: true
tags: |
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Build and push ARMv7 Docker image
uses: docker/build-push-action@v4
with:
context: .
context: ./.docker
file: ./Dockerfile.armv7 # Adjust the path to your ARMv7 Dockerfile
push: true
tags: |
Expand All @@ -42,8 +42,14 @@ jobs:
- name: Build and push ARMv6 Docker image
uses: docker/build-push-action@v4
with:
context: .
context: ./.docker
file: ./Dockerfile.armv6 # Adjust the path to your ARMv6 Dockerfile
push: true
tags: |
tagyoureit/nodejs-poolcontroller-armv6:latest
# Example of how to run docker-compose with the working directory specified
- name: Run Docker Compose
run: docker-compose up -d
working-directory: .docker # Specify the working directory here

0 comments on commit 0e932a8

Please sign in to comment.