Last active
          March 18, 2023 18:22 
        
      - 
      
- 
        Save gabonator/acedeefd78a75fff2db04cf6314df19d to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | npm install express | |
| podman build -t pokusimage . | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | FROM node:10-alpine | |
| RUN mkdir -p /src/app | |
| WORKDIR /src/app | |
| COPY package.json /src/app/package.json | |
| RUN npm install | |
| COPY . /src/app | |
| EXPOSE 3000 | |
| CMD [ "npm", "start" ] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const express = require('express') | |
| const app = express() | |
| const port = 3000 | |
| app.get('/', (req, res) => res.send('Hello World! ' + new Date())) | |
| app.listen(port, () => console.log(`My server listening at http://localhost:${port}`)) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | { | |
| "name": "pokus", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1", | |
| "start": "node index.js" | |
| }, | |
| "author": "", | |
| "license": "ISC", | |
| "dependencies": { | |
| "express": "^4.18.2" | |
| } | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # https://osric.com/chris/accidental-developer/2018/12/docker-versus-podman-and-iptables/ | |
| # iptables -I CNI-FORWARD -p tcp ! -i cni-podman0 -o cni-podman0 -d 10.88.0.0/24 --dport 3000 -j ACCEPT | |
| podman run -p 3000:3000 pokusimage:latest | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment