Skip to content
This repository was archived by the owner on Feb 8, 2022. It is now read-only.

Commit

Permalink
nut code
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Taggart committed Apr 24, 2016
1 parent 96c1c62 commit 098d80d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ sudo: required
dist: trusty
services:
- docker
# language: rust

env:
global:
Expand Down
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,4 @@ RUN cd /root \
&& chown vscode:vscode /home/vscode/install-vscode-extension*.sh \
&& su vscode -c /home/vscode/install-vscode-extensions.sh

# TODO figure out how to launch it
# CMD su vscode -c code /home/vscode
# CMD ./start-vscode.sh
WORKDIR /root
CMD /bin/bash
CMD su vscode -c "code -w /home/vscode"
19 changes: 7 additions & 12 deletions nut.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
syntax_version: "4"
project_name: golang-vscode

# Make command `docker run --rm -it -w /root -e DISPLAY=$ip:0 ctaggart/golang-vscode`
# work with Nut:
based_on:
docker_image: ctaggart/golang-vscode
enable_gui: true
# container_working_directory: /root
# Command does not mount any folder. But here is how you would do it:
# mount:
# main:
# - .
# - /root
mount:
main:
- .
- /home/vscode/golang-vscode
macros:
run:
usage: run golang-vscode image
code:
usage: start vscode to edit this project
actions:
- su vscode -c "code -w /home/vscode" # code returns immediately. Add -w flag to make it block until the window closes.
- su vscode -c "code -w /home/vscode/golang-vscode"
2 changes: 1 addition & 1 deletion run-dockerformac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ open -a XQuartz
xhost + # TODO limit to just the host
# bridge100 is disappearing after a reboot
ip=`ifconfig bridge100 | grep inet | awk '$1=="inet" {print $2}'`
docker run --rm -it -w /root -e DISPLAY=$ip:0 ctaggart/golang-vscode
docker run --rm -it -e DISPLAY=$ip:0 ctaggart/golang-vscode
2 changes: 1 addition & 1 deletion run-dockermachine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ open -a XQuartz
xhost + $(docker-machine ip)
# virtual box network, parallels was vnic0
ip=`ifconfig vboxnet1 | grep inet | awk '$1=="inet" {print $2}'`
docker run --rm -it -w /root -e DISPLAY=$ip:0 ctaggart/golang-vscode
docker run --rm -it -e DISPLAY=$ip:0 ctaggart/golang-vscode

0 comments on commit 098d80d

Please sign in to comment.