I hereby claim:
- I am jerrypreissler on github.
- I am gpreissler (https://keybase.io/gpreissler) on keybase.
- I have a public key whose fingerprint is 2CAE 442D BD8F 6432 F0F8 68E9 C678 A1B0 1AD0 2EE1
To claim this, I am signing this object:
| variant: flatcar | |
| version: 1.0.0 | |
| passwd: | |
| users: | |
| - name: core | |
| ssh_authorized_keys: | |
| - "<ssh public key>" | |
| storage: | |
| disks: | |
| - device: /dev/sdb |
I hereby claim:
To claim this, I am signing this object:
| # requires https://gist.github.com/JerryPreissler/40df842eb5ac48644479 | |
| FROM jerry/javadev | |
| MAINTAINER Jerry Preissler, [email protected] | |
| RUN \ | |
| wget --directory-prefix=/tmp http://downloads.typesafe.com/typesafe-activator/1.2.2/typesafe-activator-1.2.2.zip && \ | |
| cd /opt && unzip /tmp/*.zip && \ | |
| chmod ugo+x $(ls -d -1 $PWD/**)/activator && \ | |
| echo "export PATH=$PATH:"$(ls -d -1 $PWD/**) >> /home/develop/.profile |
| CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
| ae5e96bed377 ubuntu:latest /bin/bash About an hour ago Exited (0) About an hour ago jolly_rosalind | |
| b76bf6309025 ubuntu:latest /bin/bash About an hour ago Exited (127) 53 minutes ago condescending_carson |
| FROM ubuntu | |
| MAINTAINER Jerry Preissler, [email protected] | |
| RUN \ | |
| apt-get update && \ | |
| apt-get install -y software-properties-common | |
| # install Oracle JDK and Maven | |
| RUN \ |
| The problem: provide a user that can tunnel to a given host via ssh, but not log in or copy files from the host | |
| Solution: | |
| 1. Create user with adduser | |
| 2. Set shell for user to /bin/rbash (restricted shell, caution: this does not provide sufficient security by itself) | |
| 3. In user's home edit .profile: set path to home dir only | |
| 4. create <userhome>/.ssh/authorized_keys, chown -R user:user .ssh, chmod -R go-rwx .ssh | |
| 5. insert user's ssh public key into authorized_keys | |
| 6. set ssh permissions for this key in authorized_keys (see 'man authorized_keys') for details |
| # Require the jar files from a Maven classpath in JRuby | |
| # | |
| # ==== Attributes | |
| # * +path+ to the project root directory where Maven should be run | |
| # | |
| def maven_require(path) | |
| save_dir = Dir.getwd | |
| throw "could not change to dir #{path}" unless Dir.exists?(path) | |
| begin | |
| Dir.chdir(path) |
| Set the maven opts via an environment variable (sample is for bash, adapt as needed): | |
| export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000" | |
| Start the application, e.g. via | |
| mvn jetty:run | |
| The application should wait for a debug connection with the following message: |
| <%= form_tag "/path/data.json", {method: "put", multipart: true} do %> | |
| <%= file_field_tag :data %> | |
| <%= submit_tag "upload" %> | |
| <% end %> |