Skip to content

Commit

Permalink
Update Docker image to run on Node 14 (#249)
Browse files Browse the repository at this point in the history
Update Dockerfile to get node 14 for local build and test
  • Loading branch information
katedev21 authored Oct 2, 2022
1 parent 1ff3993 commit 3900577
Show file tree
Hide file tree
Showing 5 changed files with 317 additions and 186 deletions.
17 changes: 3 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
FROM phusion/baseimage:18.04-1.0.0-amd64

RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y npm && \
/usr/bin/npm install npm@5.7.1 -g --production && \
/usr/bin/npm cache rm && \
rm -rf /var/lib/apt/lists/* /var/cache/debconf/*-old && \
rm -rf /var/log/*.log /var/log/apt/*.log

RUN touch /etc/service/cron/down
RUN touch /etc/service/sshd/down

# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
FROM node:14-alpine3.15
RUN apk update && apk add --no-cache bash
ENTRYPOINT ["bash"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ are in the native shell, the lines with ~ are in Docker.
# Build and start the Docker container.
> docker-compose build
> docker-compose up -d
> docker-compose exec ward-leaders /bin/bash
> docker-compose exec ward-leaders bash

# Install dependencies in the Docker container
~ npm ci
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: '3.7'
services:
ward-leaders:
init: true
tty: true
build:
context: .
dockerfile: Dockerfile
Expand Down
Loading

0 comments on commit 3900577

Please sign in to comment.